Sluggish on Mobile Device

Mark Waddingham mark at livecode.com
Sat Jul 29 21:07:50 EDT 2017


On 2017-07-30 02:35, J. Landman Gay via use-livecode wrote:
> Isn't this the "datagrid scrolling" issue we just funded? The layout
> has groups inside a container group.

No - not quite.

 From what Dan said - he has a *fixed* layout - i.e. a group with 200 
subgroups. Todd has used this approach very effectively (I'm sure he'll 
be more than happy to talk about it... Assuming I understood what he 
did, based on a phone call he, Kevin and I had recently).

The DataGrid is a dynamic beast - so the currently acceleratedRendering 
mode is not sufficient.

The DataGrid2 FE was two-fold:

   1) Add the ability to have objects nested arbitrarily deep within 
'container' groups which have their own scrolling, static or dynamic 
layerMode (all non-top-level objects are static at the moment, 
regardless of what you tell them).

   2) Add features to the DataGrid to allow the left/right swiping 
behavior and main UI features you see in iOS scrollers (which, whilst 
not quite the same as Android - have dominated the mobile UI world for 
many types of list-based UI).

So if you have a completely static scrolling group (i.e. one you can 
layout 'ahead of time' or build 'ahead of time') which can fit within a 
groups 32k co-ord width/height limit - then acceleratedRendering will do 
you just fine as it is.

However, if you have a dynamic scrolling group - one which is composed 
of potentially 'infinite' numbers of objects (well, not infinite, but 
backed by a datasource which can serve arbitrary numbers of line items) 
then you need DG2.

The former works for fixed sets of data (I've seen things like Tourist 
information apps and such which use this approach - the data is fixed at 
the point of build and/or data download). However, it doesn't work for 
things like a mail app or contacts DB - where the number of things you 
want to scroll is essentially unbounded.

Of course the fundamental addition to DataGrid will allow far more. 
General compound LiveCode Script controls (which the DG is) can leverage 
it too. For example, you could build a sprite canvas (in LiveCode 
Script). Pretty much anything where you want to group (and clip) a 
collection of dynamic layers (e.g. sprites) and whizz them around at 
virtually no re-rendering cost (which is essentially what happens in 
UIDataView, you can indepdently, smoothly move each line item left and 
right). There's a whole list of things we could do in the future - 
although the next logical step is a bit of a jump implementation-wise as 
the small-tiled nature of accelRender mode is great for scrolling, but 
less great for allowing arbitrary 'free' transformations. However, lets 
get DG2 done first, and see how people get on with that. This time I 
won't make the same mistake I made when we shipped acceleratedRendering 
mode - I'll make sure we document it very clearly to ensure that 
everybody can learn how to use it effectively.

Hope this clears things up!

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list