Chris Bevan

Boosting my Jekyll rebuild times

20 Oct 2014

For a while now I’d been using the jekyll-flickr plugin for adding Flickr images to posts on this here site.

All you need is the Flickr photo ID and size you want to use. When rebuilding my Jekyll site, the plugin would cleverly use Flickr’s API to reach out, grab the raw image URL for the choosen size, before replacing the short-and-sweet plugin code for the long-form HTML markup required to properly display my Flickr image.

For example, I add this to my post:

{% flickr_photo 11804351333 "Medium 640" %}

Then each time my site was rebuilt, my slightly customised flickr_photo.rb would output the following into my generated static page:

<div class="photo-holder" style="max-width:62.5em;">
    <a href="https://www.flickr.com/photos/chrisbevan/11804351333/"><img class="photo pure-img" src="https://farm3.staticflickr.com/2874/11804351333_f60d27348c_b.jpg" title="Ugly" alt="Ugly" /></a>
</div>

As you can imagine, this looked like a good idea at the time. Unfortunately, and as I found out, there were a few significant pitfalls.

Rebuilding my site now required an internet connection. No connection, jekyll build would throw a fit.

When I had a connection, the time required to rebuild was heavily contingent on the quality of my internet connection.

Even with a blazingly fast connection, all those API round-trips started adding up pretty quickly.

Which left me with the following indicative time for rebuilding (time jekyll build) all 817 entries containing 124 individual Flickr images (generated on my current and frankly terrible 3.4Mbs ADSL+ connection):

real	4m28.038s
user	2m27.995s
sys	0m1.780s

After stripping out all those handy liquid tags and replacing them with old-school image tags, then deleting the flickr_photo.rb plugin file, my generation times are now down to this:

real	0m16.786s
user	0m14.381s
sys	0m2.372s

Quite a difference.

Building 3D with IKEA

Kirsty Parkin for The Computer Graphics Society:

“Every year, CGSociety goes to SIGGRAPH, one of the premier conferences on innovation for the computer graphics and VFX industries in the world. In 2012, we watched as Martin Enthed, the IT Manager for the in-house communication agency of IKEA, gave a short presentation. He told us how their visualisation team had evolved from the use of traditional photography for the IKEA catalogue to a system today, where the bulk of its imagery is CG.”

Hard to argue with the flexibility that moving to CG allows, especially when it looks as good as it does.

via Michael Tsai

How Melbourne Found its Laneways

Forward thinking urban planning:

“The real strength in the policy was that the state government took a long-term view, setting requirements for a 30 per cent active frontage on all new-build or major renovation projects in the retail core of the city. This was a game changer for the city centre: the active street frontage policy encouraged relatively small tenancies.”

Props too for Crown Casino and one Jeff Kennett.

Want to read some more? Head over to the archive