简体   繁体   English

如何在android webview中优化renderspeed

[英]how to optimize renderspeed in android webview

Is there a possibility to enhance the rendering speed in webview? 是否有可能提高webview中的渲染速度? With a simple innerHTML it takes close to 1 sec to display the content although the js rendering takes a few ms. 使用简单的innerHTML,显示内容需要接近1秒,尽管js渲染需要几毫秒。 With IOS, exactly the same code is running swiftly and perfectly, even with less performant hardware. 使用IOS,即使使用性能较低的硬件,完全相同的代码也可以快速而完美地运行。

Tested under Android: 2.3, 3.2, 4.0 (Desire HD, Galaxy Nexus, Galaxy Tab) IOS: 4, 5 (iPhones 3gs, 4) 在Android下测试:2.3,3.2,4.0(Desire HD,Galaxy Nexus,Galaxy Tab)IOS:4,5(iPhone 3gs,4)

Appreciate any helpful responses! 感谢任何有用的回应!

There are a few things you can try: 您可以尝试以下几种方法:

Personally, I found that keeping the DOM as small as possible, and enabling hardware acceleration made all of the difference between an unusable app, and a fairly smooth app. 就个人而言,我发现保持DOM尽可能小,并且启用硬件加速使得无法使用的应用程序和相当流畅的应用程序之间存在差异。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM