Phonegap + jQuery Mobile Improvements

2020-07-24 06:17发布

I am building a Phonegap App with jQuery Mobile, and the entire App is dynamic, it's loading data from an API. I have about 10 pages and the App is running too much slow on the Phonegap, but when it comes to native browser it's fast. There's something that I can do to speed up the Phonegap or wherever?

2条回答
闹够了就滚
2楼-- · 2020-07-24 06:35

The another way apart from disabling the CSS is that to remove or work with alternatives for GC.

JavaScript is GC based language. It means, it has unpredictable GC time which makes main thread stops. This makes UI struggles. On native implementation, you have control to use GC or not.

This wouldn't be a problem on Android. Android always had those struggling because of GC on Java. Considering this fact, most of Android users doesn't care about UX a lot. But on iOS, your HTML5 based app never be better experience than competitor's native app.

There are many workarounds for this GC time issue. Such as incremental-GC, realtime-GC and so on. But actually, there's no real solution. Because the primitive problem is you don't have control.

查看更多
神经病院院长
3楼-- · 2020-07-24 06:42

Try disabling some of the CSS that slows it down. In your jquery mobile .css file add this to the bottom:

* {
text-shadow: none !important;
-webkit-box-shadow: none !important;
-webkit-border-radius:0 !important;
-webkit-border-top-left-radius:0 !important;
-webkit-border-bottom-left-radius:0 !important;
-webkit-border-bottom-right-radius:0 !important;
-webkit-border-top-right-radius:0 !important;
}
查看更多
登录 后发表回答