Sluggish on Mobile Device

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
I have a stack/card that has:

(1) A background that is a high-res image,
(2) A group of about 200 groups that form a scrolling list,
(3) 2 buttons and another group all with transparencies that live on top of the scrolling list.

On a desktop computer, it’s fine.  But on an actual device (or the simulator), the scrolling list scrolls REALLY sluggish.  It’s slow, stutters and is absolutely unacceptable.   I have messed around with the compositorType and the layerMode of objects -- all without seemingly any effect.

Is there a secret to getting a group on a complex card to scroll cleanly, or is LiveCode (8.1.5) unable to do this smoothly?

Any assistance would be greatly appreciated!

-Dan

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
Did you set the acceleratedrendering of the group ?

Sent from my iPhone

> On Jul 29, 2017, at 5:59 PM, Dan Friedman via use-livecode <[hidden email]> wrote:
>
> I have a stack/card that has:
>
> (1) A background that is a high-res image,
> (2) A group of about 200 groups that form a scrolling list,
> (3) 2 buttons and another group all with transparencies that live on top of the scrolling list.
>
> On a desktop computer, it’s fine.  But on an actual device (or the simulator), the scrolling list scrolls REALLY sluggish.  It’s slow, stutters and is absolutely unacceptable.   I have messed around with the compositorType and the layerMode of objects -- all without seemingly any effect.
>
> Is there a secret to getting a group on a complex card to scroll cleanly, or is LiveCode (8.1.5) unable to do this smoothly?
>
> Any assistance would be greatly appreciated!
>
> -Dan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
Sorry - I mean did you set the accelerated rendering to true?

Sent from my iPhone

> On Jul 29, 2017, at 7:20 PM, [hidden email] wrote:
>
> Did you set the acceleratedrendering of the group ?
>
> Sent from my iPhone
>
>> On Jul 29, 2017, at 5:59 PM, Dan Friedman via use-livecode <[hidden email]> wrote:
>>
>> I have a stack/card that has:
>>
>> (1) A background that is a high-res image,
>> (2) A group of about 200 groups that form a scrolling list,
>> (3) 2 buttons and another group all with transparencies that live on top of the scrolling list.
>>
>> On a desktop computer, it’s fine.  But on an actual device (or the simulator), the scrolling list scrolls REALLY sluggish.  It’s slow, stutters and is absolutely unacceptable.   I have messed around with the compositorType and the layerMode of objects -- all without seemingly any effect.
>>
>> Is there a secret to getting a group on a complex card to scroll cleanly, or is LiveCode (8.1.5) unable to do this smoothly?
>>
>> Any assistance would be greatly appreciated!
>>
>> -Dan
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
In reply to this post by ** Clarence P Martin ** via use-livecode
So - quick outline...

Set the layermode of the group to scrolling.

Make sure it is just a bare group - no scrollbars, no border.

Set the layermode of the other controls to static.

Set the acceleratedRendering of the stack to true.

Hopefully that should have some effect.

Warmest Regards,

Mark.

Sent from my iPhone

> On 29 Jul 2017, at 17:59, Dan Friedman via use-livecode <[hidden email]> wrote:
>
> I have a stack/card that has:
>
> (1) A background that is a high-res image,
> (2) A group of about 200 groups that form a scrolling list,
> (3) 2 buttons and another group all with transparencies that live on top of the scrolling list.
>
> On a desktop computer, it’s fine.  But on an actual device (or the simulator), the scrolling list scrolls REALLY sluggish.  It’s slow, stutters and is absolutely unacceptable.   I have messed around with the compositorType and the layerMode of objects -- all without seemingly any effect.
>
> Is there a secret to getting a group on a complex card to scroll cleanly, or is LiveCode (8.1.5) unable to do this smoothly?
>
> Any assistance would be greatly appreciated!
>
> -Dan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
Isn't this the "datagrid scrolling" issue we just funded? The layout has
groups inside a container group.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On July 29, 2017 6:28:06 PM Mark Waddingham via use-livecode
<[hidden email]> wrote:

> So - quick outline...
>
> Set the layermode of the group to scrolling.
>
> Make sure it is just a bare group - no scrollbars, no border.
>
> Set the layermode of the other controls to static.
>
> Set the acceleratedRendering of the stack to true.
>
> Hopefully that should have some effect.
>
> Warmest Regards,
>
> Mark.
>
> Sent from my iPhone
>
>> On 29 Jul 2017, at 17:59, Dan Friedman via use-livecode
>> <[hidden email]> wrote:
>>
>> I have a stack/card that has:
>>
>> (1) A background that is a high-res image,
>> (2) A group of about 200 groups that form a scrolling list,
>> (3) 2 buttons and another group all with transparencies that live on top of
>> the scrolling list.
>>
>> On a desktop computer, it’s fine.  But on an actual device (or the
>> simulator), the scrolling list scrolls REALLY sluggish.  It’s slow,
>> stutters and is absolutely unacceptable.   I have messed around with the
>> compositorType and the layerMode of objects -- all without seemingly any
>> effect.
>>
>> Is there a secret to getting a group on a complex card to scroll cleanly,
>> or is LiveCode (8.1.5) unable to do this smoothly?
>>
>> Any assistance would be greatly appreciated!
>>
>> -Dan
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
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 ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
On 7/29/17 8:07 PM, Mark Waddingham via use-livecode wrote:
>
> 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.

I guess I misunderstood then. I have a fixed number of static groups
inside a scrolling container group and even with acceleratedRendering
turned on, scrolling is not smooth -- though it seems to be mostly an
Android issue. The only way I can get it to work is to have a single
scrolling group with loose controls inside it (no sub-groups.) I was
thinking the Datagrid FE would fix that.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
Hmmmm - do you notice a difference between accelrender on and off on android? If you can copy the group onto a bare stack as is and file it with a bug report we can take a look. That case should work well so there might be something specific going on in that case.

Warmest Regards,

Mark.

Sent from my iPhone

> On 29 Jul 2017, at 23:17, J. Landman Gay via use-livecode <[hidden email]> wrote:
>
>> On 7/29/17 8:07 PM, Mark Waddingham via use-livecode wrote:
>> 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.
>
> I guess I misunderstood then. I have a fixed number of static groups inside a scrolling container group and even with acceleratedRendering turned on, scrolling is not smooth -- though it seems to be mostly an Android issue. The only way I can get it to work is to have a single scrolling group with loose controls inside it (no sub-groups.) I was thinking the Datagrid FE would fix that.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
There may be a minor difference when acceleratedRendering is on, but not
enough to really help much. I'll see if I can extract a group. It's one
from Swami's project, built dynamically, and all the images are
referenced, so it isn't as easy as just copying a card.

Would referenced images rather than imported images make a difference?

On 7/29/17 10:23 PM, Mark Waddingham via use-livecode wrote:

> Hmmmm - do you notice a difference between accelrender on and off on android? If you can copy the group onto a bare stack as is and file it with a bug report we can take a look. That case should work well so there might be something specific going on in that case.
>
> Warmest Regards,
>
> Mark.
>
> Sent from my iPhone
>
>> On 29 Jul 2017, at 23:17, J. Landman Gay via use-livecode <[hidden email]> wrote:
>>
>>> On 7/29/17 8:07 PM, Mark Waddingham via use-livecode wrote:
>>> 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.
>>
>> I guess I misunderstood then. I have a fixed number of static groups inside a scrolling container group and even with acceleratedRendering turned on, scrolling is not smooth -- though it seems to be mostly an Android issue. The only way I can get it to work is to have a single scrolling group with loose controls inside it (no sub-groups.) I was thinking the Datagrid FE would fix that.
>>
>> --
>> Jacqueline Landman Gay         |     [hidden email]
>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
On 2017-07-30 05:43, J. Landman Gay via use-livecode wrote:
> There may be a minor difference when acceleratedRendering is on, but
> not enough to really help much. I'll see if I can extract a group.
> It's one from Swami's project, built dynamically, and all the images
> are referenced, so it isn't as easy as just copying a card.
>
> Would referenced images rather than imported images make a difference?

They shouldn't do - no.

It sounds like *something* in the group structure is causing
accelRendering not to be effective (although I'm not sure what from the
description). Are there any scripts running?

In the first instance, just the group structure would do - if we have
trouble reproducing the problem we can come back to you for a more
faithful reproduction.

Warmest Regards,

Mark.

--
Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
On 7/29/17 11:02 PM, Mark Waddingham via use-livecode wrote:

> On 2017-07-30 05:43, J. Landman Gay via use-livecode wrote:
>> There may be a minor difference when acceleratedRendering is on, but
>> not enough to really help much. I'll see if I can extract a group.
>> It's one from Swami's project, built dynamically, and all the images
>> are referenced, so it isn't as easy as just copying a card.
>>
>> Would referenced images rather than imported images make a difference?
>
> They shouldn't do - no.
>
> It sounds like *something* in the group structure is causing
> accelRendering not to be effective (although I'm not sure what from the
> description). Are there any scripts running?

Not after the card opens. It just sits there until the user tries to
scroll the group.

>
> In the first instance, just the group structure would do - if we have
> trouble reproducing the problem we can come back to you for a more
> faithful reproduction.

I'll see what I can do. The scripts are all over the place, it's a
massive project and all the working code is in script-only stacks used
as backscripts.

The same project has a single scrolling group with lots of controls in
it but no sub-groups and that one scrolls much better. It's still not
entirely smooth but the jerkiness is much reduced. Maybe I'll include
that one too, it's self-contained and will be easier to move.


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
In reply to this post by ** Clarence P Martin ** via use-livecode
On 7/29/17 11:02 PM, Mark Waddingham via use-livecode wrote:
> It sounds like *something* in the group structure is causing
> accelRendering not to be effective (although I'm not sure what from the
> description).

@Mark: I've just found why it's failing. It's the stack structure, not
the engine. That's what happens when a lot of people work on the same
project; it changed without my noticing.

Just thought I'd mention it in case you were hovering over the bug
database wondering where my report was. ;)

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode
@ monte:

Elanor has the project link to our app on Git Hub if you are interested.   I was going to submit a business support request to have your team examine that stack and see if there was a way to optimze it but I think Jacque has the bottom line:

the "Siva-Siva-Portal.livecode" stack is what Jacqueline is referring to. there is a series of "link" panels  or subgroups.  each includes

"rows"  with

414 wide grc about 100px high
Left site is a text field with the link "label"
right side is a small thumbnail.

These are then stacked on top of each other dynamically, based on a JSON file that defines both the content of the row, what image is used etc.

It works rather well, surprising fast to build even on Android. BUT these are all then grouped into one big group that is assigned the scrolling behavior…

 AcceleratedRendering does help, because, we presume, the group is not a free standalone group on top of the card.

ergo, until the Datagrid2 initiative is complete, apparently we have no solution.

but you can try:

[hidden email]:Himalayan-Academy/Siva-Siva-App.git

be sure to check out the "nightly" branch… which is the most up-to-date… then you boot Siva-Siva-App.livecode (launcher stack which is never close)

and after it init's (starts using all the libs) then it opens the Siva-Siva-Portal.livecode stack

that’s the one that "jitters." when it scrolls, quite a few beta testers who "are sensitive" have pointed this out… Others seem not to care, they are focused on content/navigation and not necessarily screen performance… it's fast enough, just "ugly scrolling"

The structure is

card "portal"
    group "Portal Layout" # contains 2 groups
          group "SivaSiva Portal Scrolling"  # this is the group that scrolls very badly no matter what we do.
                  # Sub groups
                       Header-group
                row 1 -(small group)
row 2 -(small group)
     row 3 -(small group)
     row 4 -(small group)
     row 5 -(small group)

            group "SivaSiva Portal Navigation
                  # this a fixed tool bar at the bottom of the screen


Ahhh, I wonder if  we only had two groups like this

card "portal"
      group "SivaSiva Portal Scrolling"  # this is the group that scrolls very badly no matter what we do.
                  # Sub groups
                       Header-group
                row 1 -(small group)
            row 2 -(small group)
            row 3 -(small group)
          row 4 -(small group)
           row 5 -(small group)

           group "SivaSiva Portal Navigation
                  # this a fixed tool bar at the bottom of the screen

so that the group that scrolls is *not* inside another group… if accelerated Rending  make it scroll better.

BR

 

On 7/31/17, 5:22 PM, "use-livecode on behalf of J. Landman Gay via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    On 7/29/17 11:02 PM, Mark Waddingham via use-livecode wrote:
    >It sounds like *something* in the group structure is causing
    >accelRendering not to be effective (although I'm not sure what from the
    >description).
   
    @Mark: I've just found why it's failing. It's the stack structure, not
    the engine. That's what happens when a lot of people work on the same
    project; it changed without my noticing.
   
   

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sluggish on Mobile Device

** Clarence P Martin ** via use-livecode

> On 2 Aug 2017, at 1:10 pm, Sannyasin Brahmanathaswami via use-livecode <[hidden email]> wrote:
>
> Ahhh, I wonder if  we only had two groups like this
>
> card "portal"
>      group "SivaSiva Portal Scrolling"  # this is the group that scrolls very badly no matter what we do.
>                  # Sub groups
>                       Header-group
> row 1 -(small group)
>            row 2 -(small group)
>            row 3 -(small group)
>          row 4 -(small group)
>           row 5 -(small group)
>
>           group "SivaSiva Portal Navigation
>                  # this a fixed tool bar at the bottom of the screen
>
> so that the group that scrolls is *not* inside another group… if accelerated Rending  make it scroll better.

I haven’t been following this thread sorry but yes if the group is directly on the card instead of nested then you can use scrolling layer mode otherwise it won’t work. You can check the effective layerMode to determine if you are getting what you think you should be getting. You also need to ensure you have no adornments like borders, graphic effects etc…

I just opened this report which should make things easier for people if we can do that http://quality.livecode.com/show_bug.cgi?id=20217 <http://quality.livecode.com/show_bug.cgi?id=20217>

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...