Re: [textadept] Textadept 5.0 alpha

From: Brian Schott <briancsch....at.gmail.com>
Date: Sat, 21 Jan 2012 13:49:23 -0800

That fixed the performance issues. Thanks for the idea!

Details for anyone interested:

I modified my scanner tool to output a file that looks something like this

dscannerOutput = {["imports] = {"std.string", "std.file"}, ["functions"]
= {.....

Then in my language module's init.lua, I do something like this:

local tempFileName = os.tmpname()
local runString = PATH_TO_DSCANNER.." -l "..buffer.filename.." >
"..tempFileName
local process = io.popen(runString)
process:close()
local errorCode, err = pcall(dofile, tempFileName)
if errorCode == false then print(err) return end
-- dscannerOutput is defined during the dofile call
for index, fun in ipairs(dscannerOutput["functions"]) do
...

On 01/05/2012 09:49 AM, Robert wrote:
> Brian,
>
> On Thu, Jan 5, 2012 at 5:25 PM, mitchell <c....at.caladbolg.net> wrote:
>> Brian,
>>
>>
>> On Wed, 4 Jan 2012, Brian Schott wrote:
>>
>>> On Wed, Jan 4, 2012 at 5:26 AM, mitchell <c....at.caladbolg.net> wrote:
>>>> It probably has to do with the the focus on the Scintilla widget is lost
>>>> temporarily and then restored. SCEN_SETFOCUS is emitted and goto_view()
>>>> is
>>>> called in textadept.c's s_command(). Is it causing you problems?
>>>
>>> I was using that event (along with BUFFER_AFTER_SWITCH and
>>> FILE_AFTER_SAVE) to make sure that the completions currently loaded in
>>> the adeptsense object were up-to-date with the focused buffer. Seeing
>>> it triggered on window moves and resizes was unexpected. Even with
>>> luajit reloading the completion information can take several
>>> milliseconds. The bottleneck is parsing the JSON output of my source
>>> code scanning tool and loading it into the completions table.
>>
>> I will explore this.
>>
> have you considered to directly output Lua tables (optionally, of
> course) ? If the bottleneck is the JSON parsing, this might be worth a
> test.
>
> Robert
>
Received on Sat 21 Jan 2012 - 16:49:23 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:28:04 EST