Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DigestUtils: avoid throwing on invalid digest function name
9% of samples in a profile of one of our builds were inside the `fillInStackTrace()` method. Collecting the valid names into a hashset avoids needing to construct errors every time an invalid digest function name is passed into this function. Tested with Bazel 6.4.0. Our codebase is not yet compatible with Bazel 7. I have not investigated why this function was receiving so many invalid names. Before: ![Screenshot 2023-12-15 at 2 39 01 pm](https://github.com/bazelbuild/bazel/assets/18002432/be4bd311-ca73-46ec-a06d-93bb0ca9c6ba) After: ![Screenshot 2023-12-15 at 2 43 10 pm](https://github.com/bazelbuild/bazel/assets/18002432/64b15739-538f-4752-aafd-6b2c94886595) My understanding is that this will not speed up builds directly, but it will allow BEP events to be processed more quickly. Closes #20574. PiperOrigin-RevId: 592094151 Change-Id: Ie23241c9ec40e59ba2aac1fc83e4830340260f45
- Loading branch information