bazel-skylib icon indicating copy to clipboard operation
bazel-skylib copied to clipboard

paths method performance

Open jbedard opened this issue 2 years ago • 0 comments

A lot of the paths methods are significantly slower then they could be.

I've found when invoked frequently (such as once per path in a large glob result) doing simple string manipulation is sometimes 10-100x faster (300+s to <10s in some instances). Primarily methods such as paths.replace_extension and paths.split_extension, and the underlying paths.basename. I think the primary reason being the creation of arrays/tuples only to extract a single string out of the array?

jbedard avatar Feb 08 '24 19:02 jbedard