Why is cordova slow even for css transforms?

I am creating a sophisticated hybrid application using cordova and have noticed that overall it is slow compared to when I launch the website in mobile chrome. Some of the arguments I heard don't make sense to me:

  • css animations on mobile devices are slow (if true, the site will work slowly and in mobile chrome, which is not so)

  • cordova is built on top of chrome (css conversions should not have anything to do with the corridor, chrome should be able to make them just beautiful)

Can a cord limit gpu chrome by default? Are there some tweaks that I can tune to improve css transition performance?

+5
source share
1 answer

Chrome only uses the GPU if you want to use it.

Example:

.nav-show { transform:translate(200px,200px); transition: transform 500ms linear; } 

will not be displayed with the GPU. Instead, to make the GPU work, you can use:

 .nav-show { transform: translate3d(200px,200px,0); transition: transform 500ms linear; } 

for more information, I found a cool article about this .

I don't know if there is anything else you can do about it.

I think WebView is just part of the chrome after kit-kat. In addition, your application does not work in the same environment when you debug it on chrome, which is “compiled” as a cordova application. In fact, cordova adds a wrapper around your web browser, plugins add features that chrome doesn't need to do, etc.

Hope this helps.

+3
source

Source: https://habr.com/ru/post/1208805/


All Articles