Open Munter opened 10 years ago
I've been looking at this issue. I've looked at inlineKnockoutJsTemplates transform, and found that each call to assetGraph.eachAssetPreOrder() method takes anywhere between 150 ms to 700 ms to complete (which includes the calls to assetGraph.findRelations).
A assetGraph.findAssets call takes ~ 5ms.
A assetGraph.findRelations call takes between 5ms to 15ms.
So the bottleneck in that transform is eachAssetPreOrder(). I'll try to dig in further soon.
EDIT: Correction. hmm..the slowness maybe because of the O(n^3) nature of the transform.
I have been exposing
buildProduction
to some more use cases. One of them is https://github.com/jsconf/2014.jsconf.euI've cloned the repos and built the page with jekyll. Then ran buildProduction like so:
Note all the time spent in transforms that should have no impact at all. The does not use neither Knockout nor Angular nor React, yet a lot of time is spent in those transforms. Why?