bazel-contrib / rules_go

Go rules for Bazel
Apache License 2.0
1.38k stars 656 forks source link

Speedup compilepkg args handling #4074

Open dzbarsky opened 1 month ago

dzbarsky commented 1 month ago

What type of PR is this? Starlark cleanup

What does this PR do? Why is it needed? A lot of the args between compilepkg and nogo are shared, so we can reuse the Args object. Cleaned up a few other things that showed up in profiles while I was here.

Which issues(s) does this PR fix?

Fixes #

Other notes for review

fmeum commented 1 month ago

This is a nice improvement, including to retained memory. I considered doing this right in the nogo change, but wanted to keep it small.

We should wait for the nogo release before we merge this.

dzbarsky commented 1 month ago

This is a nice improvement, including to retained memory. I considered doing this right in the nogo change, but wanted to keep it small.

We should wait for the nogo release before we merge this.

Yep, makes sense.

dzbarsky commented 5 days ago

@fmeum shall we revisit this after bazel8 ships?

fmeum commented 4 days ago

Yes, I'll also cut the long due rules_go release!

dzbarsky commented 3 days ago

Yes, I'll also cut the long due rules_go release!

OK, I've rebased this one. Maybe we can try to land https://github.com/bazelbuild/rules_go/pull/4030 after the release is cut?