bazelbuild / bazelbuild/bazel-skylib
paths method performance
- Dominant language
- Starlark
- Stars
- 444
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
Research direction
Start with the paths methods named in the issue, especially paths.replace_extension, paths.split_extension, and the underlying paths.basename, and reproduce their cost when called across a large glob result. Compare the current behavior with simple string manipulation while preserving the methods' existing results; done means the repeated operations show a substantial measured improvement.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100