Scrolling speed of a data grid

Terence Heaford t.heaford at btinternet.com
Wed Feb 26 15:02:56 EST 2014


Hi Trevor,

Thanks for the script.

Tried it a few times, average 5420

So, it seems it’s the scrollbarDrag message?

I don’t suppose there’s much that can be done then without RunRev input?

I am on a Mac, I wonder if the update to Cocoa will sort it out?

I am not really sure what is happening when they say upgrading to Cocoa?
Will it mean all Cocoa Native Controls and Cocoa’ event system.

All the best

Terry


On 26 Feb 2014, at 19:31, Trevor DeVore <lists at mangomultimedia.com> wrote:

> 
> The script is a quick and dirty auto scroller that increments the vscroll
> of the data grid by the page increment setting of the data grid scrollbar.
> That is the same amount that the data grid is scrolled when you click on
> the non-thumb area of the scrollbar.
> 
> If I click at the bottom of the scrollbar and scroll through the whole
> list, like in your video, it takes ~29 seconds. The LiveCode engine asks
> the data grid to scroll 403 times (that is how many times scrollbarDragged
> is sent from the LiveCode engine to the data grid scrollbar).
> 
> If I run the above script the data is scrolled through in ~12 seconds. What
> (I think) this demonstrates is that the speed of scrolling isn't as much
> the data grid as it is the frequency with which the LiveCode engine sends
> the scrollbarDragged message.
> 
> In order to further confirm that it isn't the data grid holding things up I
> checked to see if the data grid was "dropping" any requests to render
> itself. If the data grid gets a message to redraw itself while it is in the
> middle of redrawing then the request is queued up to be processed later
> (further requests while one request is queued will be dropped). I don't see
> the data grid queuing up any messages so it doesn't seem to be getting
> bogged down.
> 
> How long does it take for the script to run if you put the above script in
> a button, update the group reference to the name of your data grid and run
> it?
> 





More information about the use-livecode mailing list