ginetta / skeleton

a static site generator for web frontend projects
22 stars 4 forks source link

Faster pug builds #137

Closed lucalanca closed 7 years ago

lucalanca commented 7 years ago

I had an ha-ha moment on how to optimise pug performance.

In short, this optimises the performance of mergeDefaulOptions by removing the i/o call on every invocation. The required i/o call is now moved to gulp and only done 1/per module/per run (instead of 1/per mixin usage/per run).

Here's a test with 89% improvements in speed (from 18s to 2.11 s):

screen shot 2017-02-17 at 15 10 32 screen shot 2017-02-17 at 15 10 23 screen shot 2017-02-17 at 15 09 39

lucalanca commented 7 years ago

Please merge after #135 and #136