简体   繁体   English

移植的HTML5应用运行速度比手机浏览器慢

[英]Ported HTML5 App runs slower than in Phone Browser

I noticed something I can´t explain. 我注意到我无法解释的事情。 I installed XAMPP on my computer. 我在计算机上安装了XAMPP。 I copied the code of my HTML5 app inside of the htdocs folder. 我将HTML5应用程序的代码复制到htdocs文件夹中。 When i run the Browser on my WP8 (Nokia Lumia 920) and type in the IP of my Computer the App runs at solid 60 FPS. 当我在WP8(诺基亚Lumia 920)上运行浏览器并输入计算机的IP时,该应用程序将以稳定的60 FPS速度运行。 Everything is smooth and fine. 一切都很好。 I tryied to install the App on my Phone using the "Windows Phone-HTML5-App" template given from Visual Studio 2013. Now the application runs on my phone but at 40-50 FPS and is very choppy. 我尝试使用Visual Studio 2013中提供的“ Windows Phone-HTML5-App”模板在手机上安装该应用程序。现在该应用程序可以在手机上运行,​​但速度为40-50 FPS,非常不稳定。 To my mind the App runs in the same Browser. 我认为该应用程序在同一浏览器中运行。 Why there is such a big difference in performance? 为什么性能会有如此大的差异?

Thank You! 谢谢!

Edit: I changed the MainPage.xaml file. 编辑:我更改了MainPage.xaml文件。 The app was soposed to run in landscape mode. 该应用程序被设计为在横向模式下运行。 Now I tried the portraid mode. 现在,我尝试了portraid模式。 And everything runs fine at solid 59 FPS. 一切稳定在59 FPS。 I think the only one who can explain this is the one who wrode the browser! 我认为唯一可以解释这一点的人就是破坏浏览器的人! I changed the X and Y axis inside of my camera class. 我在相机类中更改了X和Y轴。

In general, keep in mind that a phone browser is able to use more resources than an app(doesn't matter if it's Hybrid or not). 通常,请记住,手机浏览器可以使用的资源比应用程序多(无论是否为Hybrid)都可以使用。 Usually native apps use those resources more efficient, that's the reason of the lack of fps problems. 通常,本机应用程序更有效地使用这些资源,这就是缺少fps问题的原因。 Why does this happend? 为什么会这样呢? Because every OS is made to in general terms "don't allow an app to block the entire phone". 因为每个操作系统的统称都是“不允许应用阻止整个手机”。

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

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