71mb added to app size for crosswalk

前端 未结 3 1496
孤城傲影
孤城傲影 2020-12-01 20:20

I really hope I\'m doing something wrong. I\'ve added crosswalk to a project and have had some serious app size increase. To test I\'ve done the following.

  1. cre
3条回答
  •  孤街浪徒
    2020-12-01 20:42

    I think the problem you're encountering though Crosswalk related, it's emulation related. I've tried emulators from both Android Studio versions and Genymotion. They both didn't work well for hybrid app testing.

    My advice is to try Chrome Device Inspector along with actual device testing. I don't think anyone will argue that's the best way to ensure performance. AWS Device Farm is just one of many offerings that will spit out physical devices for testing. There's even services that let you outsource testing on different devices by real people, just can't think of the name of it right now...

    My current favorite is Cordova Tools for Visual Studio Code, but it has been buggy for me lately.


    However, I'm in the early stages of a fleet of Cordova apps and was alarmed at the overhead Crosswalk has. ~20MB extra to your APKs, and ~70MB to the installed size of your application. That's pretty alarming, considering the apps we use it with, with resource assets (images, etc.) are about 1/10th the size of this one plugin!

    We have one app that has actually degraded with Crosswalk. My theory is that Crosswalk doesn't do a good job parsing non-standard HTML which is a core feature we have since we have XSLT transformed XML which winds up being non-standard HTML. Traversing it is extremely slow compared to the default WebView. We do a lot of manipulation with raw DocumentNode objects, so maybe that's it. That said, I'm so surprised that if it's slow traversing/appending HTML via vanilla JavaScript that these other apps are seeing performance gains!

    I also learned last night there is Shared Mode with Crosswalk which allows multiple applications that use Crosswalk to share one instance.

提交回复
热议问题