Google Blogoscoped

Wednesday, October 31, 2007

On Optimizing Gmail’s JavaScript

Daniel Pupius is an engineer at Google since 2005, with a focus on the user interface side of things. Aaron Boodman, also a developer at Google, now blogged about Dan’s role in the upcoming relaunch of the Gmail JavaScript framework:

I was worried for his sanity when he got assigned to Gmail, because it is one of the oldest and biggest JavaScript applications at Google. Therefore it was also the most, err, crufty :). (...)

He dove in to the cruft, initially on Gmail Chat, but over time more and more on core Gmail. He began agitating for change, which culminated in this new design.

Aaron continues to tell that at Google, people test-drive all their own products, e.g. using Gmail all day long (is Marissa Mayer an exception? She once told Fortune/ CNN, “I use Gmail for my personal e-mail – 15 to 20 e-mails a day – but on my work e-mail I get as many as 700 to 800 a day, so I need something really fast,” referring to email client Pine). Aaron says that a lag of half a second, for instance, is usually considered great for web applications, but that such amounts are still considered long for Gmail by some of those working on it. Aaron writes:

Because of this, the Gmail team has been to hell and back several times over the course of this project, trying to shave milliseconds off frequent operations.

As one small example, one team member reverse-engineered jscript.dll to figure out how its GC [garbage collection] algorithm worked, and was horrified to find that it had hard-coded, arbitrary limits on how many objects could be allocated before a GC would occur. This led to an insane amount of effort optimizing the code to reduce the number of allocations in core code paths.

[Via Friendfeed.]

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!