Suggestion about performance improvement - Capacitor vs Cordova
See original GitHub issueApproach:
I have made two blank angular cli project (capacitor vs. cordova) - https://cli.angular.io/
Suggestion:
Speed can be improved with 777ms / 1s 433ms
by fixing “major issues” below.
Logs:
-
Capacitor log: capacitor_mobile.log
-
Cordova log: cordova_mobile.log
Tools:
angular 5.2.0 angular cli - no ionic used capacitor: 1.0.0-beta - gradle 4 cordova: 8.0.0 - gradle 3 (issue with gradle 4 - what you need to manually solve) test device: sony xperia z3 compact android studio: 3.1.3
Summary:
Capacitor:
1, Loading Time: 4 s 140ms (06-19 02:35:05.465 - 06-19 02:35:09.605) 2, Memory used: 63-64MB. 3, Dex file size: 3MB
Cordova:
1, Loading Time: 4s 340ms 2, Memory used: 60MB 3, Dex file size: 70KB
Major issues (cause major delay):
- multidex issue or layout problem probably - appears on cordova also
06-19 02:35:05.705 - 06-19 02:35:06.482
(777ms
) …/system/bin/dex2oat - just right after “CrashFileManager”, sometimes the following chromium error happens - cordova_log contains (happened on capacitor also)
06-19 02:37:36.780 20005-20224/com.raxim.myscoutee E/chromium: [ERROR:budget_service.cc(160)] Unable to connect to the Mojo BudgetService.
(656ms
)
Negligible issues (does not cause major delay):
- “memUsed” has been called too frequently 06-19 02:35:08.429 - 06-19 02:35:08.496 (67ms)
- Why WebView on android device would like to start “devtool”? 06-19 02:35:07.064 - E/chromium: [ERROR:devtools_http_handler.cc(292)] Cannot start http server for devtools. Stop devtools.
- Gradle 4 / cordova 8 can be introduced (instead of gradle 3 / cordova 7)
Webview Team response: (for track record purpose)
- https://bugs.chromium.org/p/chromium/issues/detail?id=854471 - BudgetService is a log spam
- https://bugs.chromium.org/p/chromium/issues/detail?id=854472 - devtool is a log spam
- https://bugs.chromium.org/p/chromium/issues/detail?id=854475 - multidex is an Android Studio issue
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Capacitor vs Cordova - Ionic Enterprise Reference Guide
One of the biggest improvements Capacitor makes is making it easier to extend your app with custom native functionality. Our mantra is "you...
Read more >Apache Cordova vs Capacitor with Ionic vs NativeScript vs ...
And here comes the first question, shall I go with Apache Cordova or Capacitor? The first on I've used for Phaser (HTML5) Game...
Read more >Apache Cordova vs Capacitor | What are the differences?
Apache Cordova - Platform for building native mobile applications using HTML, CSS and JavaScript. Capacitor - The Native Bridge for Cross-Platform Web Apps....
Read more >Optimising Ionic framework applications - Mastering Ionic
One of the common complaints from mobile developers is how hybrid apps such as those built with Ionic/Cordova/Phonegap simply aren't on a ...
Read more >Ionic Capacitor emerging as successor to Cordova - TechTarget
Ionic's Capacitor has emerged as a successor to the popular Cordova framework for developing mobile apps, except Ionic Capacitor uses all ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is this still the case? I mean, the performance between Capacitor vs. Cordova… still in favour of Cordova?
Do you have a video of the differences?
Is this an Ionic Angular app or vanilla Angular app? Either way, Angular is not fast to load, so I can guarantee the bulk of the load time you’re seeing is Angular related.
The refresh, related to the router? We use a web server for Android but Cordova does not.
I highly doubt there is anything materially different in perf between Cordova and Capacitor once you factor in the above