Software Archive
Read-only legacy content
17060 Discussions

Non-Crosswalk Build very slow on Android

Patrick_M_
Beginner
775 Views

Hi I have a strange problem,

I created a project by doing. For cleaning up the code, I decided to partly move the code to a new project.

I built the app in Cordova and Legacy mode with very bad performance... a simple click-event is only fired, after many clicks on the element.

Using the s-pen of my Galaxy Note 4 triggers a hover-effect just in time. 

Building the app with crosswalk brings perfect performance. The funny thing is, that building the old project (with almost the same code) works great in Legacy and Cordova mode.

Any ideas on how to solve these problem?

0 Kudos
4 Replies
Patrick_M_
Beginner
775 Views

Same Performance-problems in App Preview.

Emulator and debug works fine.

0 Kudos
Swati_S_Intel1
Employee
775 Views

Hello Patrick,

Which UI framework are you using? Have you added any plugin to your old code? See if you have changed any touch events in your new app.

Please post the snippet of your code that's causing the problem.

Thanks,

Swati

0 Kudos
Patrick_M_
Beginner
775 Views

I'm on Bootstrap.

 

Okay... I tested it with the "touchstart"-event instead of an "click"-event. Touchstart works great. The remaining problems are:

  • on long pages I'm not able to scroll.
  • clicking on a select or the frameworks split-button still reacts after a randomly number of fast clicks

Seems to be a problem with the click event. Any ideas?

Thanks

Patrick

0 Kudos
Patrick_M_
Beginner
775 Views

Problem found:

In the new Project 

    <script type="application/javascript" src="sidebar/js/hammer.js"></script>
    <script type="application/javascript" src="sidebar/js/jquery.hammer.js"></script>
    <script type="application/javascript" src="sidebar/js/swipe-hammer.js"></script>
    <script type="application/javascript" src="sidebar/js/sidebar.js"></script>

was used for sidebar.

The old project uses:
    

    <script type="application/javascript" src="sidebar/js/jquery.event.move.js"></script>
    <script type="application/javascript" src="sidebar/js/jquery.event.swipe.js"></script>
    <script type="application/javascript" src="sidebar/js/sidebar.js"></script>
    <script type="application/javascript" src="sidebar/js/swipe.js"></script>  

So, there is a problem with the hammer part. 

Using the scriptss of the old version solved all problems, but why does the new XDK version hammer, while it brings such a lot problems with it?

Patrick

0 Kudos
Reply