Reuse protobuf encoders for synthetic attribute hashes (#32683) `SyntheticAttributeHashCalculator` allocates a 4 KiB protobuf buffer for every rule. Keep one `CodedOutputStream` per thread and give it a fresh configured `Hasher` for each rule. Flush the encoder before returning the hash, discard it after a failed write, and use a separate encoder for nested hashes. In a warmed `streamed_proto` query with synthetic hashes over 12,049 rules, JVM allocation fell from 212.2 MiB to 163.7 MiB with byte-identical output. Closes #32683 COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/bazel/pull/32683 from dzbarsky:codex/reuse-query-attribute-hash-encoder 94b21fd19c2db3d84c230c7db39f3c67eda6ba93 PiperOrigin-RevId: 1028232879 Change-Id: I1e912f119247151ac65c3b9c0cf0153ce3834058
{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.
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md