Potential perf optimisations in CompositeGlob
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
[CompositeGlob](https://github.com/Microsoft/msbuild/blob/master/src/Build/Globbing/CompositeGlob.cs) could have the following potential improvements:
- Collapse recursive tree to leaves to reduce object count. For example, `CompositeGlob(GlobA, CompositeGlob(GlobB, GlobC))` could be internally rewritten to `CompositeGlob(GlobA, GlobB, GlobC)`. This is doable as long as all Composites in one subtree are the same.
- Merge regular expressions: `CompositeGlob(GlobA, GlobB, GlobC)` could be rewritten to `GlobMerged`, where `GlobMerged`'s regex is the merger of the `GlobA`, `GlobB`, `GlobC ` regexes: `(GlobA.Regex)|(GlobBRegex)|(GlobC.Regex)`. Preliminary tests indicate this is faster by 1-2 orders of magnitude for less than ~50 regexes, but after ~100 regexes it gets exponentially slower.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.