Re: [code] [textadept] Menu modification delay 2

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Fri, 11 Nov 2016 12:29:09 -0300

Wow! The speed gain is amazing!

All seems to be working fine. I'll keep testing it....

After 100 resets....

11/11/2016 12:27:16: START
11/11/2016 12:27:16: RESET_BEFORE
11/11/2016 12:27:16: RESET_AFTER
11/11/2016 12:27:16: INITIALIZED
11/11/2016 12:27:16: change file menu 1
11/11/2016 12:27:16: change file menu 2
11/11/2016 12:27:16: change tab context menu
11/11/2016 12:27:16: change buffer menu
11/11/2016 12:27:16: change quick open menu
11/11/2016 12:27:16: change menu end

The initial 1 second delay is gone...

Great work!

Best wishes,
Gabriel

El 11/11/2016 a las 12:04, Mitchell escribió:
> Hi Gabriel,
>
> On Thu, 10 Nov 2016, Gabriel Dubatti wrote:
>
>> Hi Mitchell,
>>
>> Splitting the code in this way:
>>
>> local m1=_L['_File']
>> local m2=_L['_New']
>>
>> ....
>>
>> local m15=_L['Quickly Open _Current Directory']
>> local m16=_L['Quickly Open Current _Project']
>>
>> -------
>>
>> local menu= textadept.menu.menubar[m1]
>> menu[m2][2]= nf
>> menu[m3][2]= of
>> menu[m4][2]= orf
>> menu[m5][2]= cb
>> menu[m6][2]= cab
>> ....
>>
>> I can confirm that all the delay is in menu[] modification.
>
> Thanks for your sleuthing! I've committed a fix[1] that should prevent
> the delays over time. Please test for side effects, as I do not use a
> menubar at all and my regression tests may not have covered everything.
>
> Cheers,
> Mitchell
>
> [1]: http://foicica.com/hg/textadept/rev/fb9057b47510

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 11 Nov 2016 - 10:29:09 EST

This archive was generated by hypermail 2.2.0 : Sat 12 Nov 2016 - 06:52:47 EST