Android: Slowness/performance issues.

131 views
Skip to first unread message

ebonflex

unread,
Mar 11, 2014, 1:28:20 AM3/11/14
to codenameone...@googlegroups.com
Is it just me or do animations seem rather slow/sluggish on the Android?
Take the kitchen sink for example, I tried the date picker (the one with roulette physics), and lets just say it's not something I would consider usable in a real app because of the speed. There's also a notable "jag" with the animations you'd see in the animation section.

This could perhaps also be an issue in other platforms, but I only have an android to check with.
Anyone else experienced this? How have you circumvented it?

Shai Almog

unread,
Mar 11, 2014, 3:57:28 AM3/11/14
to codenameone...@googlegroups.com
Try defining android.asyncPaint=true in the build arguments.

Michael Kroll

unread,
Mar 11, 2014, 4:29:52 AM3/11/14
to codenameone...@googlegroups.com
This worked great for me the day it came out, but now my my app gets really slow to the point where it just freezes.
It's just a simple app with a lot of list navigations.
I'm running 4.4.2 on a Nexus 4.
Is there anything I can do to make it useable for me or should I stick with the old renderer?

Also on an unrelated note: The lists got slower than before since you added the glow effect, when using the old renderer. Is there a way to turn it off?

ebonflex

unread,
Mar 11, 2014, 1:37:35 PM3/11/14
to codenameone...@googlegroups.com
Hey Shai, massive respect. Thanks for all you guys are doing with CN1.
 
I saw that flag in your blog and put that in the build hint, but that changed nothing.
It's still quite sluggish.
 
Scrolling through a list feels like I'm using an old slow j2me app in 2002.
It doesn't seem to have that slickness that is expected by today's users.
I recreated the same app using phonegap and the responsiveness was surprisingly better.
 
I think there's some math and redundancy issues in the Android implementation of CN1, because from what I keep hearing (I don't have an iOS) things are pretty slick on the iOS side.
 
I use a Galaxy S4 and also a Tab (tablet) and both have the same performance.

Chen Fishbein

unread,
Mar 11, 2014, 2:47:11 PM3/11/14
to codenameone...@googlegroups.com
Hi,
Performance on android in general is relatively good, we are working on improvements e.g the async approach.
The date spinner is slow because of an issue with this component, we recommend using the picker instead.
If you have a specific issue with long Lists with a custom renderer it is very likely the renderer is slowing down the scrolling if it is not written properly.

ebonflex

unread,
Mar 11, 2014, 3:18:54 PM3/11/14
to codenameone...@googlegroups.com
Hi Chen, could I ask what android device/OS version you use to determine the bolded?
Perhaps that will help me analyse why android performance is sluggish for me and quite a few others.
 
Thanks

ebonflex

unread,
Mar 11, 2014, 3:21:53 PM3/11/14
to codenameone...@googlegroups.com
Quickest test, I would also suggest using the App maker app to create an app from a url (i.e. a site with an rss feed) and check what gets generated.
 
Or is it really a list issue in general?

On Tuesday, March 11, 2014 12:47:11 PM UTC-6, Chen Fishbein wrote:

Chen Fishbein

unread,
Mar 11, 2014, 4:47:14 PM3/11/14
to codenameone...@googlegroups.com
Hi,
We test on many devices Galaxy S4 is a decent device and apps should run decent on this.
Can you share a video explaining/demonstrating the sluggish experience?

Michael Kroll

unread,
Mar 12, 2014, 9:09:55 AM3/12/14
to codenameone...@googlegroups.com

Somehow it looks ok on video, but it doesn't really feel smooth if you use it yourself.
The iOS Version doesn't have that problem, you can't even tell it's not really a native app.

Shai Almog

unread,
Mar 12, 2014, 1:31:51 PM3/12/14
to codenameone...@googlegroups.com
Make sure you used the async paint flag I mentioned earlier. It makes the kitchen sink and similar demos feel far more fluid on the newer devices.
Our old pipeline was very optimized but with later versions of 4.x the rendering behavior shifted considerably and things that used to be performant are now an anti-pattern.
We would turn this pipeline on by default but it still has some outstanding bugs.
Reply all
Reply to author
Forward
0 new messages