-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cordova optimization for Android release #63
Comments
Update about Web Workers. A few hours ago I went back and started testing web workers in Cordova under Chrome (browser), iOS, Android. I discovered that iOS was crashing not because of some lack of support for Web Workers in iOS webviews, but actually because of the Safari Web Inspector. It being open triggered the crash, at the app's WKWebView's call to |
More updates. I proceeded to get the app deploying to and installing on Android device. Since Android doesn't support ES6 well (with keywords such as |
…dated status of #63 in Contributing section
I've observed things such as…
big lag on adding wallet - when dismissing login scr and when showing wallet details while adding wallet - probably related to the request itself, and the parsing that's done
big lag on adding contact - the 'resolving' OA network request?
big lag on typing into addr field on create contact - some bg thing? parsing of txs? (keyimgs)
slow transitions
degrading performance over time
Web Workers
All the stuff that's put on the background thread under Electron is on the main thread in Cordova, because Web Workers haven't been implemented yet.
I actually started working on it but discovered some serious and varied issues that made me put it on the back-burner and get the code ready to publish.
However I expect this to give a huge boost to performance.
A model for how to perform background tasks and associate the asynchronous replies with the original requests is demonstrated in
local_modules/electron_background
. This is used throughout the Electron app.I suggest a Cordova analogue of this be created and then used to create the appropriate 'background' adaptations of various currently-main-thread tasks, such as
APIResponseParser.cordova.js
.At least everything which is being done on the background under Electron should be done similarly in Cordova, but I expect that also backgrounding the network requests in the API client – under Cordova specifically, not Electron – will yield a performance boost. (Note that in Electron the request is very intentionally done in the renderer process and should not be moved.)
However, in order to facilitate backgrounding the network request itself, a little bit of architecture work may need to be done. The main blocker to me doing all this architecture work and coding work to put these objects in the background is simply how crazy it turned out to be to get Web Workers working under Cordova in both iOS and Android in the first place! So if anyone wants to figure that out, it would be a huge help. (Edit I am currently looking into this)
Various rendering tricks?
try
-webkit-transform: translateZ(0)
- potential issue - see http://stackoverflow.com/questions/10814178/css-performance-relative-to-translatez0 and http://stackoverflow.com/questions/10014461/why-does-enabling-hardware-acceleration-in-css3-slow-down-performance/10114994#10114994try -webkit-backface-visibility: hidden; and perspective:1000, esp on Android, but just for > And 2.3, if even necessary - http://stackoverflow.com/questions/10014461/why-does-enabling-hardware-acceleration-in-css3-slow-down-performance/10114994#10114994
however it's quite possible these are partially or wholly redundant these days and not the biggest source of issues , see http://ilee.co.uk/css-translate3d-performance-hack/
Navigation animation optimizations
DOM element count and special effects reduction
Memory usage growth?
I instrumented memory usage growth and it looked good. But I may only have instrumented a limited set of functionality and this should be further examined. (This would obviously benefit the Electron/desktop app as well).
The text was updated successfully, but these errors were encountered: