3 ms·
Anthony Sottile has a good bit on it: https://www.youtube.com/watch?v=tFrh9hKMS6Y https://www.youtube.com/watch?v=tFrh9hKMS6Y TL;DR: Path() initialization is v
by BiteCode_dev 4y ago
Anthony Sottile has a good bit on it: https://www.youtube.com/watch?v=tFrh9hKMS6Y https://www.youtube.com/watch?v=tFrh9hKMS6Y
TL;DR: Path() initialization is very heavy compared to simple strings, and subsequent path operations produce new Path() objects every time.
The video then illustrates the point with a patch to the black formatter cache yielding a 40X speedup.
- dralley 4y agoOh, that is unfortunate. Thanks for the tip.