Closed UltCombo closed 9 years ago
Oh, I just noticed we can replace most for...in
s inside async functions with parallel async functions for even better perf.
Great job @UltCombo ! I just tried and it seems work very fast. My blog has 153 posts and the build time stays between 700ms and 800ms, that's awesome!
Added one more optimization, now this branch is up to 33% faster than master (testing on JS Rocks). There are more optimizations to be done.
Added one last optimization for now, I estimate this branch to be about 35% faster than master now.
Testing on my machine, this branch is up to 10% faster than master when building the JS Rocks website. @jaydson please test.
The next step (in a future PR) would be to parallelize
harmonic.clean
and the in-memory generation of the file contents, and then output the resulting files right afterclean
finishes. I'm leaving this for the future as it may require splitting the CSS preprocessing and posts/pages/index/categories generation in two functions each, or some smarter trickery in order to achieve this parallelism.