Investigate environment lock contention under parallel deploys
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
## Context
Follow-up from PR #7776 (exegraph) review - wbreza Pass 3, finding M4.
## Problem
Every Getenv/LookupEnv call in pkg/environment/environment.go acquires mu.RLock individually. Under 30+ concurrent goroutines (e.g. parallel service deploys all reading env vars), this may become measurable contention.
## Acceptance Criteria
- [ ] Profile env read contention under realistic parallel workloads (30+ goroutines)
- [ ] If measurable: consider batching reads, sync.Map, or snapshot-on-write pattern
- [ ] If not measurable: close as won't-fix with profiling evidence
## Notes
Not catastrophic - current impl is correct. This is a performance investigation, not a correctness fix.
## Related
- PR #7776 (exegraph engine)
Contributor guide
Assessment
This issue has not been assessed yet.