perf: investigate protobuf builders in hot paths
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go, grpc
- Domain
- performance
Research direction
Start with the response-envelope construction in message.go and find where the protobuf _builder{...}.Build() calls sit on per-message paths. Write microbenchmarks comparing builder and setter forms with representative message shapes, reporting ns/op, B/op and allocs/op. Done means a recorded results write-up plus, only where the gain justifies it, targeted setter changes that keep field values and presence semantics intact.
Written by the indexing model from the issue text.
Description
Question
Does construction with protobuf Opaque API _builder{...}.Build() add meaningful allocations or execution cost in Gorums hot paths compared with creating a message and calling setters?
The Go protobuf Opaque API article describes the API and its performance motivations.
The result depends on message shape, compiler behavior, and workload, so measure Gorums' own paths before changing them.
Investigation
- Identify builder use on frequently executed library paths, starting with response-envelope construction in
message.goand other per-message paths. - Benchmark equivalent builder and setter implementations with representative message shapes and current toolchain.
- Report
ns/op,B/op, andallocs/op; include an end-to-end call benchmark if microbenchmarks show a meaningful difference. - Check that alternatives preserve field values and presence semantics.
- Record results and recommend targeted setter changes only where the benefit justifies the added code.
Keep a repository-wide builder rewrite outside this investigation.
- Dominant language
- Go
- Stars
- 149
- Forks
- 15
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 46
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from relab/gorums
-
doc
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Maintainers usually reply within 1 day
-
gorums: reduce generated-code hooks in the application-facing APIPossibly taken @meling claimed this 1 day ago. Opencleanup
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
doc
Difficulty 3/5 Half a day Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 30/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
cmd/ebitenmobile: multi-language bindings run the complete generator twicePossibly taken @kumagi claimed this today. Openos:macos performance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
hajimehoshi/ebiten#4011 · 1 comment ·
Maintainers usually reply within 1 day
-
agent-butler-finding chore
Difficulty 1/5 Under an hour Newbie friendliness 78/100
jordansmall/spindrift#6318 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Eyevinn/moqlivemock#166 ·
Maintainers usually reply within 1 day