Chrome - a browser designed for qooxdoo
Filed under: Development, Discussion, Performance, Safari
By Fabian Jakobs @ September 2, 2008 11:58 pm
"Google will release a browser" that was the news of the day. But what does this mean for qooxdoo? Judging just by reading the available information (before the release) it seems to be the browser we as JavaScript developers have been waiting for.
But wait a minute. A state of the art browser is nothing one can build over night. Not even Google can do this. Remember how long it took for the Mozilla team to create a somewhat decent bowser after being open sourced? The same is true for Safari. The first Safari basically sucked. Safari 2 was usable to surf the web but to run qooxdoo it had too many bugs and too poor JavaScript performance. Now Google tells us they have a brand new web browser, which is meant to raise the bar for all other web browsers. Normally I wouldn't expect much from a completely new web browser still in its beta stage but hey this is Google and they promise a lot. So of cause I had to download and test it.
I'm impressed
To make things short: "I'm impressed!". They really deliver what they promise. Chrome is really fast, the rendering is correct and I even like the UI. But the best is it runs qooxdoo without any modifications.
Granted they use the WebKit rendering engine, which we support, but most other parts of the browser (including the JavaScript interpeter) are new and could not be tested with qooxdoo before. Even gmx.com, a fairly large qooxdoo 0.7 application, runs without any problems.
Pushing browser technology
Its nice to see qooxdoo running smooth and fast in Chrome but what really matters to me is that this browser raises the bar for the other browser manufacturer technologically.
Finally JavaScript is getting some love. After WebKit's SquirrelFish and Mozilla's TraceMonkey Chrome's interpreter V8 is the third JavaScript interpreter within a very short period of time, which promises way better JavaScript performance. Good JavaScript performance is one of the key prerequisites to write even more feature rich web applications. Technically I should not call them interpreter as at least TraceMonkey and V8 use just in time compiling (JIT) but I'm used to use this term so I'll stick with it for the moment. Cool about V8 is not only the technology but also that they have released the source on the same day as the browser. Its under the BSD license, which basically means that everyone who wants to embed this interpreter is free to do so.
The second ground breaking feature is threaded browsing. In February Thomas has written a nice article about why Firefox should support one JavaScript interpreter per tab. Now a few months later Chome is here and does exactly that. Isolating the tabs from each other and especially the JavaScript interpreter in the different tab is a real killer feature to me. This is a feature your parents and grand parents have waited for - of cause without knowing it
There should be no reason that the UI of the whole browser freezes just because some badly written JavaScript code is running. With Chrome we see that at least Google can do better. My hope and my prediction is that we'll see this in Firefox and Safari in the not so far future as well. I'm not so sure about the Internet Explorer though. Maybe in the year 2012 in IE9.
Developer Friendly
To make a browser successful, tooling is a critical aspect. Anyone who ever had to debug JavaScript in IE6 and got the infamous "Undefined is null or not an object" error with no indication where the error happened knows what I am talking about. There is a huge difference between a browser, which can run AJAX applications and a browser which can be used to write AJAX applications. Fortunately the Google guys are tech guys and they stuffed a lot of interesting developer tools into Chrome. So Chrome definitely is a browser, which can be used to write AJAX applications.
Chrome developer features:
- A process monitor, which shows how much memory, CPU and bandwidth is consumed by each tab
- A stripped down version of WebKit's DOM inspector. Here is still room for improvements but is good to see this in the first beta release
- A command line JavaScript debugger. This one is really geeky. I haven't yet figured out how to use this beast. Maybe I just wait for the GUI.
- Gears is included
All in all I must say I'm more than impressed by Chrome. One can see that Google has written this browser with web applications like GMail in mind and what is good for GMail is clearly good for qooxdoo as well. The 'beta' label is probably only there because people expect this from Google. I've seen worse browsers marked as a stable release. My only gripe with Chrome right now is that its not yet available for the Mac.
I encourage everyone to download and test it - if you like it install it on your mother's computer
Have fun
Update
I have to apologize to the Internet Explorer team. I said that I don't expect them to run the browser tabs in different threads. In fact IE 8 already has this feature. It was just slipped under my radar. I guess this is because they marked it mainly as a security feature. Thanks Markus for correcting me. Whether a browser isolates JavaScript execution can easily be tested by typing this URL javascript:while(1) {} in the location bar.




Comment by Benoît Collignon
Indeed, I was very impressed by the excellent javascript performance too… Browser wars still begins, for a better web I must say.
Waiting now for the final release of Firefox 3.1 to compare “speed” …
September 3, 2008 12:18 am
Comment by Fabian Jakobs
Just to get an idea of how much faster Chrome’s JavaScript engine is, take a look at Ray Cromwell’s benchmarks.
Note that he compares Chrome to the latest development versions of Firefox 3.1 and WebKit. Still Chrome is about twice as fast.
September 3, 2008 12:30 am
Comment by LH
Yes, it’s a really nice first release, much bettern then I thought after reading the comic
But it’s still not perfect. It has sometimes a very slow scrolling performance, a problem that it got from the webkit engine (safari has the same problem on the same sites).
But for JS its great. And great to hear that it has no big bugs that stops it from running qooxdoo
September 3, 2008 12:14 pm
Comment by Markus
“I’m not so sure about the Internet Explorer though. Maybe in the year 2012 in IE9.”
Doesn’t IE 8 already do that? http://blogs.msdn.com/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx
September 3, 2008 1:03 pm
Comment by Fabian Jakobs
They did only go the half way. They separated the tabs from the rest of the browser process. This helps in terms of security but does not solve the problem of JavaScript blocking other tabs. They do not isolate tabs of the same window from each other.
September 3, 2008 1:53 pm
Comment by Markus
Are you sure? http://twitter.com/cwilso/statuses/906158262 makes me think otherwise… maybe the tabs are in separate processes, but their JavaScript execution still blocks on each other?
September 3, 2008 2:37 pm
Comment by Fabian Jakobs
I think you are right. I’ve updated the article.
September 3, 2008 3:59 pm
Comment by Florian
I’ll get a blank page when I run http://demo.qooxdoo.org/current/demobrowser/
September 7, 2008 11:15 am
Comment by Sam
Yeah.
I get a blank page too.
September 8, 2008 3:27 am
Comment by James Milligan
Can I just say that GMX doesn’t work in Chrome… quite annoying really. Can I ask how you got it to ‘work’? Also, what version is it? A developer version? Because I’m running the dev version - the latest one (0.3.154.3) and it doesn’t work…
October 21, 2008 7:58 pm
Comment by Fabian Jakobs
Hi James,
I used the first version of Chrome just after it was released. I don’t whether the newer revisions have issues with gmx.com. I will forward it to the gmx.com developers.
October 22, 2008 3:54 pm
Comment by James Milligan
Thanks for your reply Fabian - it’s stated on the GMX forum that Chrome definitely doesn’t work, so I was amazed to see you running it!
Let me know what GMX say regarding it. Thanks for your time.
October 22, 2008 3:56 pm
Comment by Fabian Jakobs
I’ve just installed and checked the latest Chrome version (0.2.149.30) and it works without any problems. I’m a bit irritated by your Chrome version number. Do you use any special build?
October 23, 2008 2:12 pm
Comment by sufehmi
Whether a browser isolates JavaScript execution can easily be tested by typing this URL javascript:while(1) {} in the location bar.
.
Sorry I’m being thick here - what to expect from it ?
.
I tried it on the latest Firefox (3.1b2), and it froze the entire browser (which has about 10 tabs opened).
.
Does that mean that 3.1b2 (which features Mozilla’s newest JavaScript engine - TraceMonkey) still run all Javascript code (including its own GUI) all together / unisolated from each other ?
October 26, 2008 3:21 pm
Comment by James Milligan
er yes it is a special build - I’m on the development channel for it:
http://www.chromeplugins.org/chrome/chrome-developer-updates/
Hope that helps you
October 26, 2008 3:48 pm
Comment by Fabian Jakobs
@sufehmi
Your observation is right. If this script freezes the browser, than the browser will run all JavaScript in one process. Since FireFox builds its own user interface with JavaScript as well, the entire browser freezes. Currently only Chrome and IE8 separate JavaScript execution within different tabs.
@James
Thanks for this information. I’ll try it with your special build but I don’t think gmx.com will do bug fixing for a developer build of Chrome. But I do expect support for all official releases.
October 27, 2008 9:50 am
Comment by Thomas Herchenröder
@sufehmi: You’re absolutely right. It’s not so much about using Javascript for the browser chrome, but about the lack of separation between chrome and tabs that causes the issue. This is still missing in Firefox, and no new and shiny JS engine can amend for this - it’s the architecture that sucks.
October 27, 2008 12:36 pm
Comment by James Milligan
No problem Fabian - it’s not often I’m able to help experienced people like you!
October 27, 2008 7:00 pm
Comment by kenny
FWIW, the qooxdoo hello world example does not work on Chrome 0.3.154.9. Anyone know why? Clearly Chrome will be huge for a JS-heavy lib like qooxdoo.
November 16, 2008 11:53 am