top | item 2317804

IOS 4.3 Nitro JS engine disabled for full screen apps and uiwebview

88 points| marcusramberg | 15 years ago |mobilexweb.com | reply

43 comments

order
[+] naz|15 years ago|reply
I think Hanlon's razor applies here. A lot of people will be slating Apple for sabotaging non-native apps, but it's really just a bug.
[+] benologist|15 years ago|reply
Yes, it's bug #108978: Can't figure out where to extract 30% of revenue from.
[+] geuis|15 years ago|reply
To add another note to this, its a bug that Apple seems to know about. I can't link to it because its marked CONFIDENTIAL across the top of the dev forums, but in short its known about and being investigated.
[+] buymorechuck|15 years ago|reply
I suspect the reason is due to security concerns about running JIT executable code in 3rd-party apps. I have a harder time understanding full-screen web apps, however. Those should be running within some kind of full-screen Mobile Safari mode.
[+] happybuy|15 years ago|reply
Yes I believe when the SquirrelFish (now Nitro) JS engine was initially announced that it relied on allowing certain items in memory to become executable (most likely due to the JS interpretation and then execution) - and that due to the security model in iOS and the ARM processors this was not allowed.

In general I believe its good to not allow random bits of memory to become executable as it can easily introduce a large number of security and memory overflow vulnerabilities.

Perhaps as part of iOS 4.3, Apple has allowed Safari to circumvent this restriction but not any other application. Which would make sense because they control and are responsible for Safari, but to allow any application to circumvent this restriction could open iOS up to large security issues.

[+] dunham|15 years ago|reply
It's possible that only MobileSafari.app is signed with the entitlements needed to do JIT (write to executable memory segments?). The full-screen web apps open as separate applications and might not look like MobileSafari to the OS.
[+] statictype|15 years ago|reply
Can't be security. From what I understood Web apps work in the browser but when bookmarked as home-screen icons, they don't use the new js engine (even though it's still running in Safari)

Benign explanation: some bug in safari

Tin foil hat explanation: Apple doesn't want web apps to be as good as native apps. This explanation kind of falls apart when you ask why they would bother boosting the js engine at all.

[+] geuis|15 years ago|reply
Some numbers for folks to examine based on 3x test of each state:

Non-fullscreen: 4094.5ms (test average) Fullscreen: 10528.2ms (test average)

[+] geuis|15 years ago|reply
A follow-up. I'm running sunspider on both my iPhone 4 w/ 4.3 and iPad v1 with 4.3 to get better numbers on this. I'm actually seeing my iPhone is 2x faster than the iPad in completing this test. This seems odd...
[+] geuis|15 years ago|reply
I've done more thorough testing and posted the results here: http://news.ycombinator.com/item?id=2318412

I've re-done the tests for the iPad. Mobile Safari javascript is more than 2x as fast when run in the browser versus fullscreen mode.

[+] some1else|15 years ago|reply
I would paraphrase this to "Nitro JS not enabled for fullscreen apps and UIWebView".

Their exact motives will be revealed when they announce whether they plan to fix it or not.

Sure looks like a convenient bug though. In a sense, Microsoft probably didn't intentionally loose to other browsers with IE6, it was just very convenient for them to keep the entire web application ecosystem gimped for a few releases of Office...

[+] matclayton|15 years ago|reply
Does apple actively want native apps to out perform html5? Of course, but enough that would hinder the natural install points, seems a little crazy even for apple...... is this the same on the iPad and iPhone/iPod?
[+] Klonoar|15 years ago|reply
You can't actively want what will always be. I love Webkit/et all, but people need to get this through their heads that native will always trump JS when it comes to iOS development.
[+] g-roc|15 years ago|reply
it's a known issue to apple, several bug reports have been filed, so let's wait and see (hope). it's pretty discouraging nevertheless. if you want to confirm with the V8 benchmark, you can use my homescreen-enabled version (version 5) here: http://pavingways.com/test/v8-5/ - numbers are around 230 in safari to only 90 as a homescreen app :(
[+] zitterbewegung|15 years ago|reply
I wonder what is the reasoning behind disabling the faster JS engine for full screen apps and uiwebview?
[+] kgutteridge|15 years ago|reply
The cynics view would be because as the web app approach becomes less distinguishable from native apps speed, those web applications end up running as well on equivalent speed hardware such as Android and other platforms as they would on iOS, ceding some of iOS advantage in the richness and diversity of its applications.

However it should be noted most of the popular applications in the iOS app store are in fact games

The real reason is likely to be more to do with security around the js runtime, especially when UIWebView is placed in "wrapped" applications

[+] ig0rskee|15 years ago|reply
Does anybody have insights into general performance implications of using UIWebViews vs Mobile Safari?