X

The iPhone's poor JavaScript performance

The iPhone's poor JavaScript performance

Ben Wilson

No one expected the iPhone to deliver desktop-class performance with regard to Web-based applications, but JavaScript speed on the iPhone is downright sluggish in most respects -- a frustrating fact given that AJAX is the only current method for building dynamic third-party applications for the iPhone.

Celtic Kane online offers a Javascript benchmark that tests various Javascript functions: Try/Catch with errors, Layer movement, Random number engine, Math engine, DOM speed, Array functions String functions and Ajax declaration. In our informal tests, a MacBook Pro running at 1.83GHz with Mac OS X 10.4.10 and the Safari 3.0.2 beta delivered test times of ~300 ms on average. Our in-house iPhones, however, delivered test times in excess of 9000 ms on average.

Of course, benchmarks are benchmarks, so we tested a few of the most intensive AJAX Web apps in existence: games. While they all delivered smooth play on our MacBook Pro, they were virtually unplayable on the iPhone, exhibiting lazy movement and slow response to cursor input. Among the games we tried:

  • BunnyHunt (extremely sluggish movement)
  • Vox Imperium (crashed the iPhone browser)
  • Super Maryo World (unplayable on the iPhone because of the lack of a user-triggered keyboard, but demo is extremely slow)

The Meebo Web-based instant messaging service, which now works to some extent with the iPhone, is also very slow to respond.

Given the poor JavaScript showing, we have to wonder if Flash (or Flash Lite) wasn't ommited due to performance concerns.

Feedback? info@iphoneatlas.com.