Thursday, February 11, 2010

Chemoinformatics in the browser: Chrome finishes first

While developing my little demo in the previous article, I found that different browsers could handle different job sizes depending how fast their JavaScript engines are.

Chrome 3.x finishes first before Firefox 3.x and ye olde IE 6.x is almost unusably slow for substructure searching with JavaScript.

The possible job sizes are:

Browsermax. job size
Chrome 3.x100
Firefox 3.x25
IE 6.x5

Thus, the server sizes jobs according to the user-agent header sent:
if (uatype.find('Firefox/3') != -1):
timeout = 500
maxsize = 25
elif (uatype.find('Chrome/3') != -1):
timeout = 200
maxsize = 100
elif (uatype.find('MSIE') != -1):
maxsize = 5
timeout = 1000

While I knew that Chrome's JavaScript engine is fast, I didn't expect it to be that dominant.


  1. That's a big difference. Which version of Firefox? If 3.5, have you tried 3.6?

  2. Firefox 3.5.7 and Chrome 3.x. I have 3.7 and 4.x now installed and will post the results ASAP.