Tuesday, September 2, 2008

Google Browser: Something Old, Something New, Something Borrowed ...

It's official: Google joins the fleet of browser vendors tomorrow.

Um ... why?

Funny you should ask! Google has commissioned a Scott McCloud instructional comic book to explain things.

The buzzword overview:
  • Apple's open-source WebKit, having been recommended by Google's Android team, won the rendering spot for its leanness and speed
  • JavaScript will be handled by the V8 virtual machine:
  1. V8 interprets JavaScript not into an intermediate representation requiring delay for later interpretation, but directly into machine code for speed; the machine code is the internal representation, eliminating interpretation and enhancing speed.
  2. V8 uses hidden class transitions, which allows V8 to assign a "class" to objects sharing the same characteristics, so they can share the same optimizations.
  3. V8 uses a precise garbage collector to eliminate bloat and error caused by conservative garbage collection; it should be faster and allow quicker re-use of unused memory because un-pointed-to objects will be immediately detected and their memory deallocated.
  • Vigourous multiprocessing slaughters browser bloat; closing tabs kills the processes (not just intra-process threads) handling the tab, so you are guaranteed memory reclamation as you close tabs and pages. Leaving the browser open all day won't mean the same processes stay running all day collecting garbage in them, so even bad leaks can be controlled. A look at which processes are eating system resources will identify which web pages are at fault, or whether the fault is in a plugin -- because all these will be on different processes. Slick, eh? You will actually know where to file a bug report!
Because each tab has its own process, jailing malware is trivial, and permissions more fine-grained. Only plugins -- which are not open source and which currently require higher-than-normal privileges -- create a high-profile attack vector. However, Google's browser's user base is likely large enough that plugin developers will re-write to require fewer privileges, and to be better netizens.

Google Chrome is a huge win for browser users, as it raises the bar on security and performance. Obviously, it's a huge win for Google, too: high-performance browsers means better access to rich web applications and more use of the web.

Just as Google benefited from the code lift of WebKit -- which presumably it's enhancing with bugfixes and optimizations -- other browsers may be able to leverage V8 to enhance performance of JavaScript. (Note that the next version of Safari includes a VM-based JavaScript engine supposedly several times times faster than its predecessor. Expect to see a Squirrelfish vs V8 bake-off.)

The only identifiable loser in sight is Microsoft, whose Win32 API becomes less valuable as other widely-known APIs become accessible to customers and developers. (Well, except to the extent that if Mozilla loses browser share, it'll lose referral revenue paid to it by Google for Google searches conducted in the Mozilla search box, but there's no reason that Mozilla can't take steps -- like adopting the winner of the Squirrelfish v. V8 bake-off, or offering superior responsiveness to feature requests -- to make its offerings attractive enough to maintain adequate share to sustain its economic requirements.)

I will look forward to using Chrome. The old idea of a browser, the new V8 engine, the borrowed WebKit, and the blue-toned graphic novel explaining it all seem to promise Chrome and its users a happy marriage.

Yeah, but ... why is Google offering Chrome? You never said!

Oh, yeah. Chrome will deliver Google Gears so that Google can make its own API widely available to users. Google is, you know, an applications developer. The fact that Google's primary revenue comes from advertisements confuses people, but the basic fact is that Google sells software and software services. Gears enables Google to deliver its software API to anyone with a browser. Gears is intended to allow Google to behave as a developer on a first-class API regardless whether your operating system was created by volunteers or rented to you by a software firm in Washington or delivered to you pre-installed on a computer designed in California. Chrome delivers Gears so that you can enjoy the applications Google wants you to run in place of your existing desktop applications.

Then, Google will try to sell you online multi-location collaboration support and other services. In the meantime, you get a bloat-resistant, leak-containing attack-hardened browser that stands a good chance of inviting plugin developers to do something at last about their lousy security.

So, enjoy that Chrome!

UPDATE: John Siracusa agrees this is Microsoft's worst nightmare, brought to life. Google's Chrome Team has a blog post on the fact Chrome is coming to an OS near you, Linux and MacOS users. Patience, patience.


Anonymous said...

I don't think the V8 virtual machine is that fast compared to TraceMonkey and SquirrelFish.


Jaded Consumer said...

Thanks for posting the first bake-off link!

I notice that V8's performance seems to vary geratly depending whether one is using Google's test suite, or someone else's. Typical bake-off behavior, eh? On the other hand, is it possible that Google's test is based on demand Google anticipates its own applications will make on the engine?

It'll be interesting over time to see how the different projects' products compete. I'm impressed with the possibility that hearty competition and idea exchange between the various projects might really help not only the projects' products, but their users.

High-performance, standards-based platforms have to be good for users, and should lower the barriers to entry for prospective developers (e.g., the fewer proprietary tools to buy, the easier to get going).

Thanks again!

bathtub refinishing manhattan said...

This is a good post and i love Google browser(Google Chrome) and i love it's features and it is fast then the other other browser.