Thứ Hai, 31 tháng 10, 2011

Apple Enables Nitro JavaScript Speed for iOS 5

iOS users have undoubtedly noticed that JavaScript web apps run faster on Safari than on the home screen. Apple has decided to solve this issue by improving JavaScript performance for the apps which have been saved on the home screen in its upcoming iOS 5.
The Cupertino-based company enabled the Nitro JavaScript engine for Safari in iOS 4.3. The engine converts the interpreted JavaScript code into a native ARM code. Normally the native code is on a writeable memory, but the engine changes it into executable. Thanks to this process, the iOS is capable to run apps up to 2.5 faster.
The improvement was only valid for web based apps since they run on Java Script, but home apps saved to the home screen run in a different process (Web.app) that is incompatible with Nitro engine. Usually, an app cannot make a writeable page executable if the app has not been signed by the developer and checked by Apple.

But the company has allowed Mobile Safari to generate code in a dynamic manner within protected memory and commands the CPU to execute that code. The problem is that web.app is not allowed to generate code in iOS 4.3 and above.
However, Apple has permitted Web.app to do exactly that in iOS 5 which means web-based apps stored to the home screen will run just as fast as those on Safari.
But there is a catch: apps loading webpages in the WebKit view cannot access the engine because Apple wants to avoid dynamic code injection in third-party apps. The company can control the code from Mobile Safari and Web.app and issue security updates to counter threats, but it cannot do the same for third-party apps.

Không có nhận xét nào:

Đăng nhận xét