Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[perf] Replace only-path-without-wrappers with sed (jetify-com#1535)
## Summary This replaces our existing `only-path-without-wrappers` wrapper implementation to use `sed`. Context: We use `only-path-without-wrappers` to remove bin wrappers in the environment of our binaries. This is particularly useful when a binary calls another binary. See jetify-com#1160 for more context. Unfortunately this adds a perf hit to every single binary call. In my informal experiments this cost was ~40ms. For example: Previously, `time go version` was taking ~60ms even if environment is fully up to date. Now, `time go version` takes ~20ms. @Lagoja I'm getting an error in the elixer example (since that was the motivation for the original fix) but it looks like nix elixer on Sonoma is broken: https://elixirforum.com/t/bus-error-after-upgrading-to-sonoma-beta/56354/33 (Our CICD runners will test on Ubuntu and older macOS, Monterrey I believe) ## How was it tested? * Tested time to call `go version` before and after * Inspected PATH of shell to ensure `.wrappers` was still there. * Copy pasted `sed` code from one of the bin wrappers
- Loading branch information