volkszaehler/volkszaehler.org — pull request #149 by andig (2014-05-20 07:21:10+00:00)
Title: Reduce startup time

I've spent some time optimizing volkszaehler startup behaviour. These are the main issues I've found:

- capabilities are loaded synchronously from middleware -> changed to cache data using DOMStorage
- entity definitions are loaded one by one -> changed to builde into single request per middleware
- large number of smallish requests for icon images -> combined into sprites.css

To automate the sprite creation I've added a `gulp.js` task which is based on `node.js`. To build after adding/ changing images simply run

gulp build

On my local machine this has reduce frontend startup times from >2sec to ~1sec. The effect should be even more visible on small things like raspberry pi.

An additional optimization step of bundling and minimizing CSS and JS (especially jquery-ui!) is not implemented yet as it would require a dedicated build/deploy process.

**WARNING**: this PR needs some more testing beyond Windows/ Firefox/ Chrome.