Building Google Gears 0.3.2.0

Thursday, January 3rd, 2008

The google gears team recently announced the features that will be added in gears 0.3

One of them particularly caught my eyes: the Desktop API. It provides a simple method that lets you create a shortcut icon on the user desktop, to launch your web application. Is’s particularly interesting for an offline-enabled web application, and improves the user experience while making web applications one step closer to Rich Desktop Applications.

However, google doesn’t provide the 0.3.2.0 version yet. If you want to try it, you’ll have to compile it yourself from the gears svn version. (There’s a tutorial to build it under windows, for MacOS, a simple “make” will work)

As the compilation procedure was not so straightforward under windows, here are the xpi files (firefox only) from the latest svn revision (revision 638) :

Once you’ve installed it, you can try this snippet : (it won’t work unless you change the icon urls to REAL icon files)

var desktop = google.gears.factory.create('beta.desktop');
desktop.createShortcut("Test Application",
       "An application at http://www.test.com/index.html",
       "http://www.test.com/index.html",
      {"16x16": "http://www.test.com/icon16x16.png",
       "32x32": "http://www.test.com/icon32x32.png",
       "48x48": "http://www.test.com/icon48x48.png",
       "128x128": "http://www.test.com/icon128x128.png"});

I’m now impatient to be able to launch firefox without the browser chrome (like Prism) ! I think I’ll have to wait for Firefox 3 :)

Google Gears performances issue

Monday, December 3rd, 2007

I’ve been using Google Gears rather intensively (see Gears In Motion) during the last few months.

I started building an interface that uses all the components of Google Gears (Local Database, Local Server and WorkerPool), and implemented a synchronization engine. The result was a much more responsive offline application with many features that couldn’t have been easily implemented without the local database, and that works great !

Until… one of my coworker tried to import 20.000 records: It took 40 minutes to execute the SQL INSERT statements ! (approx. 120ms/insertion)

We then decided to write this 100 insertions test, which revealed to have surprising results :

  • On MacOS 10.4.11: 2.6ms by insertion (approx. 385 insertions/second)
  • On Windows XP and Vista: 107ms by insertion (approx. 9 insertions/second)

Please run the test and post your results as a comment indicating your OS/Browser version/Google Gears version.

Any idea why it is so slow on Windows ?

Running demo for Gears In Motion

Wednesday, October 17th, 2007

I just added a demo to show Gears In Motion in use:

Gears In Motion (v0.2.1) demonstration