JavaScript performance? What about layout performance?
Wednesday, 24. June 2009, 15:46:50
Performance benchmarks are all the rage these days, but everyone seems to be focusing narrowly on artificial benchmarks that basically tell you how certain browsers perform at the particular JavaScript functions chosen for those particular benchmarks.
It's surprising that there is little or no focus on other, perhaps more relevant performance aspects of modern pages. For example, how do browsers perform when it comes to dynamically changing the style of a page (CSS)?
It's surprising that there is little or no focus on other, perhaps more relevant performance aspects of modern pages. For example, how do browsers perform when it comes to dynamically changing the style of a page (CSS)?
At Velocity 2009, Google's Lindsey Simon talked about exactly that, and the slides from his presentation show a few interesting graphs.
It turns out that Opera's layout engine is very fast at dynamically changing the page content, and this is used everywhere on the Web today. Perhaps the next move is to make browser benchmarks more relevant by running more than just JavaScript tests?
Another related issue that I saw mentioned the other day was a rather flawed and narrow memory usage test which doesn't take into account how different browsers deal with memory in different ways. For example, it ignored Chrome's shared memory, and did not seem to be taking Opera's advanced memory cache into account.
Opera also cleans up the image cache after 10 minutes or so, but that does not seem to be reflected in the test. We could have done the cleanup all the time, but then we would have to sacrifice performance like Firefox apparently does.
On a related note, and in order to tie JavaScript benchmarking and memory usage testing together, Carakan will likely take the speed crown for artificial JavaScript benchmarks, but perhaps at the cost of using more memory.
It is basically a tradeoff.



Dennis_Hawks # 24. June 2009, 16:29
Is it possible to customize this behavior? For example, for a longer or shorter period?
dbloom # 24. June 2009, 16:47
[edit] The original slides from Souders are at http://dl.google.com/io/2009/pres/W_1115_EvenFasterWebSites.pdf ... Lindsey reused slide #44 in his talk.
haavard # 24. June 2009, 16:53
dbloom # 24. June 2009, 16:54
Originally posted by haavard:
Nope, it's at Velocity which is still underway
http://en.oreilly.com/velocity2009
kailapis # 24. June 2009, 16:57
dbloom # 24. June 2009, 17:01
Originally posted by kailapis:
As long as memory is finite, efficient usage is important. Otherwise, you can end up with memory fragmentation or, if your working set can get big enough, really slow garbage-collects.
artyname # 24. June 2009, 17:27
Originally posted by kailapis:
Opera has same core on all platforms, including mobile, and there's not too much memory available on these.
haavard # 24. June 2009, 18:00
artyname: Futhark could still be used if Carakan's memory requirements turn out to be too high for platforms on the lower end of the spectrum. I would assume that Carakan would be able to run comfortably on high-end smartphones, though.
Indyan # 24. June 2009, 19:30
Chas4 # 24. June 2009, 23:36
Originally posted by Indyan:
One other thing is that javascript speed only works if you have a fast internet connection, on slow connections you will not see the improvements as much
BleedingHeart # 25. June 2009, 06:38
Chrome
Opera / Firefox (Too close to call)
Safari
IE
This despite Safari always coming out on top in JS benchmarks.
Any and all performance improvements in any area are always welcome though.
Anonymous # 25. June 2009, 08:09
What?? Firefox is the slowest of the lot (except IE)!
malsumis # 25. June 2009, 16:00
xErath # 25. June 2009, 18:37