Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

@richmarr
I love optimising stuff
Currently founding an insurance company #ThingsIThoughtIdNeverSay

Sizlate

@simonmcmanus
The near-legendary @simonmcmanus should be here somewhere...
Damn, I love zooming in
res.render('home', {
    selectors: {
        'a': {
            href: 'http://yahoo.com',
            title: 'yahoo',
            innerHTML: 'yahoo'
        }
    }
});
res.render('home', {
    selectors: {
        'ul#people': {
            partial: 'person',
            data: [
                { name: 'bob' },
                { name: 'anna' }
            ]
        }
    }
});
How to optimise this?
  1. Build DOM
  2. Inject placeholders
  3. Serialise, split on placeholders
compiledTemplate = [
	"<html><body> My name is <span class='name'>",
	undefined,
	"</span> </body></html>",
];
compiledTemplate.index = { "span.name":0 };