commit | 2ccce395cadf79bc0914b1fd04dd22fed6c7c8fe | [log] [tgz] |
---|---|---|
author | jhorvitz <jhorvitz@google.com> | Tue Feb 16 16:09:44 2021 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Feb 16 16:10:44 2021 -0800 |
tree | 0fd5a89ff31c2f732d7e1b49cbd100cdb6b1d562 | |
parent | 36de45a63fdb4691e2087a293d43387b7b06af2d [diff] |
Switch from `getSegments()` to `containsUpLevelReferences()` in `ArtifactRoot#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
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md