Daniel6149833
Posts: 0
Joined: Fri Aug 16, 2013 9:29 pm

Information on Speed VS Elements in view. Why its laggy.

So i have been having a painful time trying to find a solution for android and HTML not getting along. Still no luck, but i do have a wad of information on some reasons why. After all this is the first step in fixing an issue.

All apps where tested in a controlled environment, all offline apps, no calling external data from code databases or any of that crap. Also each element was tested in different projects on each peripheral.

  1. IOS Browsers, VS IOS Hybrid app have almost no difference even with stressful html with threaded lists, that take 10+ minutes for the app builder to actually make. (better async please?) I have tested this with buttons text images animations etc. I have used Real devices simulators both hybrid and browser. NO difference.

  2. Android is another story... Depending on your hardware, software, firmware, date created, and a whole crap ton of other things depends your speed. Basically with a stock HTC One made about a year ago (fast, standard speed for todays day and age.) Using the stock browser, chrome, or even a web view with the IDE testing in an actual app, The html is processed quite well... That is.... Until you click something.

    What i can make out of this is that when you click, first the html indicates a tap or selection (hover of the mouse if on pc) second, the browser may also create a selecting indication. third, android creates a green highlight indicating you are selecting something. Forth, android and the browser try to get the next page, (.5 - 5 seconds on a simple event on click action) Fifth, animation! No... more like 5 frames of death. This is where android running .....java..... decides to run each frame as slow as possible. after the animation is complete, it seems to assemble the screen which will delay interactivity and cause a flash and look very unappealing.

    Android simulators cannot simply be tested. PC, Mac, or even Supercomputer, they all use java and as a speed benchmark, these are not related, nor predictable. So i used android devices strictly, HTC One, One X, and Inspire 4G. Also Samsung Galaxy S II, S III, Note, and Tab. They all give laggy skippy results.

    After all initial tests on everything as in buttons content all mixed in, i started with tables and content (labels and images.) Android handles this well, it feels like a normal webpage on the browser (framerate) and like a normal app on the hybrid.

    However this all changed because of one button. Frame rates dropped, slower response. PAIN. I added a simple menu with 4 items that opened a mixture of popups and pages with simple content. The pages with the content was fine (ahhhh relaxing frame rate) however not so much with the popup... Slow laggy pain with the same content. (i think the buttons are hiding below it!!!!!)

    In conclusion android and HTML aren't going to get along with these buttons if they are the way they are now. Maybe it would be possible to simplify them?

    Also the libraries you use for displaying the page, try using a simple webview or attempting to use the GPU instead.............

    This is all supposed to be helpful. Appery.io uses all external things for hybrid apps. So there isnt really that much help here for hybrid apps. just expect them to look at the html. YOUR html for things that slow down the app. This is because you are paying for a compilation of free libraries that take html and display it.

    I will continue to test. I will now be working on my own webview instead of using these libraries as a simple alternative to remove the constant checking if the user clicked or if its a selection.. I hate java, and android with a passion.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Information on Speed VS Elements in view. Why its laggy.

Daniel,

Thank you for the research!

Daniel6149833
Posts: 0
Joined: Fri Aug 16, 2013 9:29 pm

Information on Speed VS Elements in view. Why its laggy.

No problem. Im still having issues. I am now looking into the buttons and the code put into them. Something in the code is too much for the browser or webview for android. Especially with multiple buttons.

Daniel6149833
Posts: 0
Joined: Fri Aug 16, 2013 9:29 pm

Information on Speed VS Elements in view. Why its laggy.

UPDATE!

Android hates buttons! But which ones are the most tolerable? Non rounded. Make sure to uncheck the rounded corners on each button or menu list. I think this is because android cannot handle transparent widths as well. By adding 4 buttons and navigating to the page the framerate is under 10 FPS. Preventing the buttons from being rounded grants a nice rate of 20 - 40. Still slow and not close for production.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Information on Speed VS Elements in view. Why its laggy.

Thank you very much for reporting this.

Daniel Mills
Posts: 0
Joined: Mon Jun 11, 2012 8:59 pm

Information on Speed VS Elements in view. Why its laggy.

No problem. I'm now looking into the css and other elements in the buttons to see if I can make it work for me and possibly others.

Errmmm... I guess I signed in with my google account. Lol same person though!

Return to “Issues”