I am making an app for Android using phonegap and jquery mobile. When I use phonegap build and try it on my Galaxy S3 it is very slow and clicks take over a second for anything to happen. I already tried setting the Android SDK version to 14 but that didn't do anything. This is going to be an app that is going to take massive amounts of data from a large server with 50 items being loaded at one time. I heave read around that Phonegap isn't very good for large scale things like this so is there any way to optimize Phonegap for this? or do I just need to just use something else, and if so what is the best thing to use?
Phonegap app running very slow on android
2.7k views Asked by chrispytoes AtThere are 2 answers
Abd Rmdn
On
i know this is a bit late but this answer will be for people who are still facing this issue, i faced the same issue a week ago, and ended up finding that the issue wasn't because of:
- hardware acceleration
- SDK version
- nor the phone hardware specs
which might be the reason sometimes for certain cases, but if u're using jquery,
then its peopably because when the android application use the Webview, it doesnt handle the JQuery animation very well, which will result a big performance issue, so what you should do is to replace the JQuery animation with CSS3 animation,
to help more, if you're using the jquery animate() function to do animation, then you can just add the JQuery.transit library after normal JQuery library, and use the [transit] function instead of the [animate] function. no need to modify parameters, just replace the function name and thats all.
you can find the library in this link: jquery.transit
after using the library you'll notice a huge performance jump, and everything will work smoothly after that.
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in JQUERY
- In Datatables, start value resets to 0, when column sorting
- Bootstrap modal not showing at the desired position on a web page when the screen size is smaller
- window.location.href redirects but is causing problems on the webpage
- Using JQuery Date Slider
- Storing selected language in localStorage
- How to stop other divs from still showing when i click a different button?
- Check multiple values with jQuery
- Bootstrap component does not want to render in Datatables function
- put white spaces when entering an amount moneytype symfony
- Trouble accessing custom header in AJAX response using jQuery in Fiware Keyrock
- I just cant make it work, HTML, JS and Firebase error
- Didn't declared variable still not getting any error in JavaScript
- Move element horizontally while scrolling vertically in pure JavaScript
- allow multi carousel in same page
- Embedded TikTok posts / thumbnail styling issue
Related Questions in JQUERY-MOBILE
- Jquery mobile nav bar items not properly placed
- jQuery Mobile Autocomplete freeze all the page
- How can i fix the error i get when i run cordova build android on windows cmd
- want to make a swipe menu common for all page of my html,
- JQueryMobile not keeping default style for dynamically appended html
- class added to div prints extra pages confusion
- Discord time stamp bug
- Show different element if the the class has the class active
- jQuery-Mobile fancy popup box works with jQuery 2.1.3 but breaks with jQuery 2.2.4
- ASP.NET MVC 5 : model not binding to HttpPostedFileBase from Razor form w/jQuery Mobile
- Filtering an unordered list with jQuery Mobile 1.5
- i want to show footer navbar on different situation in JQUERY MOBILE
- Getting the information of a mobile device by connecting to it
- Checkbox styles not applying when loading data asynchronously
- How do I get the content to display in the other menu options?
Related Questions in CORDOVA
- how to get rid of the cordova screen when you open the app
- How to build a codesandbox project to android apk?
- Cordova Android run failed
- Cordova Build issue since version 12.0.0
- cordova-background-geolocation-plugin don't giving any response in cordova android app
- provider duplicate while compiling a Cordova application for the Android platform
- Detect clickable areas within <img> tag in Ionic project
- Whitelisting Ionic app in Salesforce Org for CORS/CSP
- gradle keeps failing. Cordova run. Vscode
- Cordova plugin splashscreen issue while Azure Devops with ant build using android-cordova application
- Ionic 3 issue while generating AAB file
- Xcode Undefined symbols, Linker command failed with exit code 1 (use -v to see invocation)
- Xcode 15.3 build failed
- Samsung screen zoom ruining my cordova built android app
- command: ionic server Killed 9
Related Questions in PHONEGAP-BUILD
- Why does Google think my app is sending data about Installed Apps?
- The prefix "tools" for attribute "tools:node" associated with an element type "uses-permission" is not bound
- Phonegap is offline - error 403 - Will it get online again? Do you know other alternatives?
- Will existing apps built with build.phonegap continue to work after Adobe discontinue's build.phonegap service?
- Can't install Admob Plugin on PhoneGap Build Android App
- How can I continue building Ionic iOS apps without a mac?
- Ajax call not working on Android 8 built with Phonegap
- ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability
- ERROR ITMS-90725: "This app was built with the iOS 12.1 SDK. New apps for iPhone or iPad must be built with the iOS 13 SDK or later."
- Getting "App Not Installed" message after attempting to install new version of Android app
- interstitial ad (plugin: admob-free)
- How do I show ads in Phonegap Build using the Phonegap-admob plugin?
- How could i build android and ios app from ember app with online platform without downloading SDK and XCODE?
- all standart icon for Cordova cli-9.0.0 android and IOS app
- Phonegap Build Error - Certificate doesn't match profile: The default keychain doesn't have an identity matching
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
For the click issue, checkout
fastclick.js(https://github.com/ftlabs/fastclick)Most mobile webviews have a 300ms click delay to wait for a double click for zooming in on content.
Fastclick.jsallows you to bypass this.Additionally for overall performance issues, you should be mindful of the amount of javascript libraries used. I have made a number of application with phonegap that rely heavily on large amounts of external data and found that trimming down on libraries and using my own JS optimized for my exact purposes has worked best.
I use handlebars.js for templating / view display and always use
forloops instead of jqueryeach. There have been studies that showforbeing up to 1000x faster thaneachwhen loading large sets of data. This is becauseeachrecursively finds each instance where asforsimply iterates through a set of data.