500 ms to set a thumbpos??
Kay C Lan
lan.kc.macmail at gmail.com
Mon Apr 14 04:29:41 EDT 2014
LC 6.6.x is known to have a speed issue with Retina displays, but that
doesn't appear to be the issue here. I did a quick test, brand new Stack, a
scrollbar, a combobox and a button with the following script:
on mouseUp
repeat 20 times
put the millisec into tStart
set the thumbpos of sb "scrollbar" to random(100)
put the millisec into tEnd
put (tEnd - tStart) & "," after tData
end repeat
put char 1 to -2 of tData into tData
put "Min: " & min(tData) & " ms" & cr into msg
put "Max: " & max(tData) & " ms" & cr after msg
put "Avg: " & average(tData) & " ms" & cr & "%%%%%%%%%%" & cr after msg
put empty into tData
--now do combobox
repeat 20 times
put the millisec into tStart
set the enabled of btn "cb1" to false
put the millisec into tEnd
put (tEnd - tStart) & "," after tData
put the millisec into tStart
set the enabled of btn "cb1" to true
put the millisec into tEnd
put (tEnd - tStart) & "," after tData1
end repeat
put char 1 to -2 of tData into tData
put "cbdMin: " & min(tData) & " ms" & cr after msg
put "cbdMax: " & max(tData) & " ms" & cr after msg
put "cbdAvg: " & average(tData) & " ms" & cr & "%%%%%%%%%%" & cr after
msg
put char 1 to -2 of tData1 into tData1
put "cbeMin: " & min(tData1) & " ms" & cr after msg
put "cbeMax: " & max(tData1) & " ms" & cr after msg
put "cbeAvg: " & average(tData1) & " ms" & cr & "##########" & cr after
msg
put "Now use Lock Screen" & cr after msg
put "##########" & cr after msg
put empty into tData
put empty into tData1
--lock the screen
lock screen
repeat 20 times
put the millisec into tStart
set the thumbpos of sb "scrollbar" to random(100)
put the millisec into tEnd
put (tEnd - tStart) & "," after tData
end repeat
put char 1 to -2 of tData into tData
put "LS Min: " & min(tData) & " ms" & cr after msg
put "LS Max: " & max(tData) & " ms" & cr after msg
put "LS Avg: " & average(tData) & " ms" & cr & "%%%%%%%%%%" & cr after
msg
--now do combobox
repeat 20 times
put the millisec into tStart
set the enabled of btn "cb1" to false
put the millisec into tEnd
put (tEnd - tStart) & "," after tData
put the millisec into tStart
set the enabled of btn "cb1" to true
put the millisec into tEnd
put (tEnd - tStart) & "," after tData1
end repeat
put char 1 to -2 of tData into tData
put "LScbdMin: " & min(tData) & " ms" & cr after msg
put "LScbdMax: " & max(tData) & " ms" & cr after msg
put "LScbdAvg: " & average(tData) & " ms" & cr & "%%%%%%%%%%" & cr after
msg
put char 1 to -2 of tData1 into tData1
put "LScbeMin: " & min(tData1) & " ms" & cr after msg
put "LScbeMax: " & max(tData1) & " ms" & cr after msg
put "LScbeAvg: " & average(tData1) & " ms" & cr & "##########" & cr
after msg
unlock screen
end mouseUp
Results prior to using QuickRes workaround to speed up 6.6.x
Min: 1 ms
Max: 20 ms
Avg: 15.95 ms
%%%%%%%%%% cbd = combobx disabled
cbdMin: 216 ms
cbdMax: 231 ms
cbdAvg: 219.4 ms
%%%%%%%%%% cbe = combobox enabled
cbeMin: 216 ms
cbeMax: 221 ms
cbeAvg: 218.45 ms
##########
Now use Lock Screen
##########
LS Min: 0 ms
LS Max: 1 ms
LS Avg: 0.1 ms
%%%%%%%%%%
LScbdMin: 0 ms
LScbdMax: 1 ms
LScbdAvg: 0.051282 ms
%%%%%%%%%%
LScbeMin: 0 ms
LScbeMax: 1 ms
LScbeAvg: 0.05 ms
##########
Results after using QuickRes workaround to speed up 6.6.x
Min: 12 ms
Max: 21 ms
Avg: 16.8 ms
%%%%%%%%%%
cbdMin: 98 ms
cbdMax: 100 ms
cbdAvg: 99.05 ms
%%%%%%%%%%
cbeMin: 97 ms
cbeMax: 102 ms
cbeAvg: 99.3 ms
##########
Now use Lock Screen
##########
LS Min: 0 ms
LS Max: 1 ms
LS Avg: 0.05 ms
%%%%%%%%%%
LScbdMin: 0 ms
LScbdMax: 1 ms
LScbdAvg: 0.051282 ms
%%%%%%%%%%
LScbeMin: 0 ms
LScbeMax: 1 ms
LScbeAvg: 0.05 ms
##########
Obviously locking the screen has a huge effect, but even without locking
the screen the QuickRes workaround seems to half the time for enabling and
disabling a combobox and although slow at 100 ms is still 4 times faster
than you report.
If you are seeing a difference in speed between your stack and a brand new
stack then there must be something in your stack that is slowing things
down.
On Mon, Apr 14, 2014 at 2:34 PM, Dr. Hawkins <dochawk at gmail.com> wrote:
> On Sun, Apr 13, 2014 at 11:15 PM, J. Landman Gay
> <jacque at hyperactivesw.com>wrote:
>
> > I see, so he's only calling ck once at the end. I had thought it was
> part
> > of a longer sequence where it was interspersed throughout.
> >
>
> Just the once, and it just appends after a scrolling field in another
> window and puts to the message box (it's really so that I can log/debug in
> standalones)
>
>
> In that case you're quite right and the logging handler doesn't matter.
> > But that leaves the question of what those 38s are doing in there with 0
> > milliseconds between them.
> >
>
> I put a log after every statement in the handler to see where the time was
> going.
>
> This is with 6.6. I found that with a new stack, the time dropped
> significantly.
>
> I then found another time-hole. Setting the disabled of a combobox takes
> about 400ms, and this occurred in a brand new stack, too.
>
> I then loaded the stacks with 5.5, and the thumbpos still took something
> like 23 ms, but the disabled dropped to a couple of ms.
>
> I knew the 6 serious was low-beta grade all along, but this is kind of
> ridiculous . . .
>
>
>
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list