Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from
getSegments()
to containsUpLevelReferences()
in `Arti…
…factRoot#asDerivedRoot`. `getSegments()` iterates over the path string twice and also creates garbage by taking substrings and putting them in a list. `containsUpLevelReferences()` takes constant time, as it does not need to look past the 3rd character of the already-normalized path string. Additionally, clean up `PathFragment#containsUpLevelReferences` so that it does not perform string concatenation. PiperOrigin-RevId: 357826526
- Loading branch information