On 2019-08-29 16:24, Dan Friedman via use-livecode wrote:
Hello again!   I am have a tough time getting things to run snappy on
an Android device.  It's blazing fast on my computer, and more than
acceptable on my iPhone, but on any android device, it's slow...
noticeably sluggish.   The issue is mainly hiding/showing groups.  For
example:

put the milliseconds into m
lock screen --for visual effect in rect (the rect of grc "ne_BG")
//removed the animation for speed testing
hide grp "ne_mainControls"
show grp "ne_repeatG"
unlock screen --with visual effect push left
answer (the milliseconds - m)

The result of m is:
iMac = 10
iOS = 1   (iPhoneX)
Android = 516  (Moto G5 Plus Android 7.0)

The groups contain no images or complex graphics. Just some buttons and fields.

I have tried it with and without acceleratedRendering.  Actually, with
acceleratedRendering enabled it took longer, m=558.

I have it setup like this:
Card "calendar"
   Group "newEventG"  --> layerMode set to "Container"
      Group "ne_mainControls"  --> layerMode set to "Dynamic"
      Group " ne_repeatG"  --> layerMode set to "Dynamic"

Any thoughts or advice?  Most other functions are working within
acceptable ranges/speeds.

So the first thing to do is (on Desktop) run with acceleratedRendering and ensure that:
   1) 'the effective layerMode of group "newEventG"' is container
   2) 'the effective layerMode of group "ne_mainControls" is dynamic
   3) 'the effective layerMode of group "ne_repeatG" is dynamic

If (1) does not turn out to be the case then acceleratedRendering will have a slightly negative effect (as the engine will be doing what it would do without acceleratedRendering on, but also paying the overhead of caching the result!). To fix this you'll need to tweak the properties of the newEventG group:

   - opaque must be false
   - showName must be false
   - hScrollbar must be false
   - vScrollbar must be false
   - showBorder must be false
   - all bitmap effects must be empty

Essentially the rule here is that for a group to be a container layer it must not have to render anything itself (as it is just meant to 'contain' other layers).

If you get the groups effective layerModes as above I'd imagine you *might* see a slight increase in performance with acceleratedRendering on - the showing and hiding of the dynamic layers is essentially 'free' in this scenario - but their content does need to be cached first. Caching of dynamic layers happens incrementally as parts of them are visible.

However, given the difference in speed between the platforms with acceleratedRendering off I'm inclined to think something else is going on here... The CPU on a Moto G5 Plus is substantially less powerful than even an iPhone6S - but definitely not 50x!

You mentioned in another thread that you were using custom fonts... Do you get better performance if you remove the use of custom fonts and just go with the default?

Warmest Regards,

Mark.

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

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

Reply via email to