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.
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.
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.
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.
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.
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...
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...
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?
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.
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 :(
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
[+] [-] naz|15 years ago|reply
[+] [-] benologist|15 years ago|reply
[+] [-] geuis|15 years ago|reply
[+] [-] buymorechuck|15 years ago|reply
[+] [-] happybuy|15 years ago|reply
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
[+] [-] statictype|15 years ago|reply
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
Non-fullscreen: 4094.5ms (test average) Fullscreen: 10528.2ms (test average)
[+] [-] geuis|15 years ago|reply
[+] [-] geuis|15 years ago|reply
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
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
[+] [-] Klonoar|15 years ago|reply
[+] [-] g-roc|15 years ago|reply
[+] [-] zitterbewegung|15 years ago|reply
[+] [-] kgutteridge|15 years ago|reply
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