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):
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):