question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestion about performance improvement - Capacitor vs Cordova

See original GitHub issue

Approach:

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:

  1. Capacitor log: capacitor_mobile.log

  2. 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):

  1. 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
  2. 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):

  1. “memUsed” has been called too frequently 06-19 02:35:08.429 - 06-19 02:35:08.496 (67ms)
  2. 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.
  3. Gradle 4 / cordova 8 can be introduced (instead of gradle 3 / cordova 7)

Webview Team response: (for track record purpose)

  1. https://bugs.chromium.org/p/chromium/issues/detail?id=854471 - BudgetService is a log spam
  2. https://bugs.chromium.org/p/chromium/issues/detail?id=854472 - devtool is a log spam
  3. https://bugs.chromium.org/p/chromium/issues/detail?id=854475 - multidex is an Android Studio issue

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
1BJK903commented, Jun 15, 2020

Is this still the case? I mean, the performance between Capacitor vs. Cordova… still in favour of Cordova?

1reaction
mlynchcommented, Jun 18, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found