Skip to content

perf(proxy): Optimize lock usage in proxy connection handling#64

Draft
LaurenceJJones wants to merge 1 commit intodevfrom
proxy-lock-perf-improvements
Draft

perf(proxy): Optimize lock usage in proxy connection handling#64
LaurenceJJones wants to merge 1 commit intodevfrom
proxy-lock-perf-improvements

Conversation

@LaurenceJJones
Copy link
Copy Markdown
Member

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

  • Change activeTunnel.conns from slice to map for O(1) add/remove
  • Improve lock scoping in UpdateLocalSNIs: use read lock for diff computation, minimize write lock hold time
  • Move cache invalidation outside lock (go-cache is thread-safe)

How to test?

Internal proxy usage.

- Change activeTunnel.conns from slice to map for O(1) add/remove
- Improve lock scoping in UpdateLocalSNIs: use read lock for diff
  computation, minimize write lock hold time
- Move cache invalidation outside lock (go-cache is thread-safe)
@LaurenceJJones LaurenceJJones changed the title ehance(proxy): Optimize lock usage in proxy connection handling perf(proxy): Optimize lock usage in proxy connection handling Mar 13, 2026
@LaurenceJJones LaurenceJJones marked this pull request as draft March 13, 2026 15:57
@LaurenceJJones
Copy link
Copy Markdown
Member Author

place in draft till #65 is accepted or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant