Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up channel config operations #727

Merged
merged 6 commits into from
Oct 23, 2023
Merged

Speed up channel config operations #727

merged 6 commits into from
Oct 23, 2023

Conversation

FZambia
Copy link
Member

@FZambia FZambia commented Oct 18, 2023

Proposed changes

Using atomic.Value to avoid config locks, adding rolling cache with item expiration for retrieving ChannelOptions.

Before:

BenchmarkContainer_ChannelOptions-12    	 8343092	       140.7 ns/op	      32 B/op	       1 allocs/op
BenchmarkContainer_Config-12            	23106529	        50.98 ns/op	       0 B/op	       0 allocs/op

After:

BenchmarkContainer_ChannelOptions-12    	22248208	        46.87 ns/op	       0 B/op	       0 allocs/op
BenchmarkContainer_Config-12            	54884310	        21.48 ns/op	       0 B/op	       0 allocs/op

@FZambia FZambia merged commit 6c4c79a into master Oct 23, 2023
4 checks passed
@FZambia FZambia deleted the speed_up_config branch October 23, 2023 04:52
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