TulipeMoutarde.be    About

Kill all the compiling!

This blog post was written a long time ago and may not reflect my current opinion or might be technically out of date. Read with a grain of salt.

Written on September 28, 2012.

Two cool projects, one in Ruby/Javascript, the other in Pharo Smalltalk. They both try to get rid of unnecessary compilation of source code.

TurboLinks

TurboLinks speeds up Rails app. Basically, when you click on a link of your application, body and title are replaced. The browser does not load a whole new page. This avoids the recompilation of all the javascript and CSS by the browser. TurboLinks takes care of the history by using pushState. It falls back to the regular behaviour if the browser does not support pushState.

The speedup is quite visible, especially if you have a lot of Javascript and are on a mobile browser.

Tanker

Managing packages in Pharo/Squeak is quite a pain. Metacello helps but loading a project and all its dependencies takes a loooooong time. Try to load Seaside, Magritte, and CloudFork, you’ll understand what I mean.

The reason is simple: a Monticello package contains the plain sources. When loading it, Pharo has to compile all the sources.

Tanker uses the Fuel serialiser to load your code. It serialises the compiled methods and can restore them in another image without the need for recompiling.

Loading seaside now takes around 20 seconds (it could take ~10-15 minutes before).

edit: Mariano’s comment clarifies the loading speed of Tanker versus Monticello loading. I went a bit too fast to my conclusion ;)

xkcd compiling