-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Reduce allocations to store config on context in Activator #11013
Reduce allocations to store config on context in Activator #11013
Conversation
Codecov Report
@@ Coverage Diff @@
## main #11013 +/- ##
==========================================
+ Coverage 87.95% 88.01% +0.05%
==========================================
Files 188 189 +1
Lines 9116 9133 +17
==========================================
+ Hits 8018 8038 +20
+ Misses 842 839 -3
Partials 256 256
Continue to review full report at Codecov.
|
e0b43eb
to
847f47d
Compare
/retest HTTP2 probe stuff. Alerted the networking team. |
With the benchmark in #11014 the results are as following:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
👍
The current store implementation has 5 allocations in its HTTP Middleware - 2 in the call for `r.WithContext(ctx)` - 1 to allocate the new value context - 1 to allocate a new *Config - 1 to load the untyped config This reduces the footprint of the store to just one allocation by 1. Storing the intermediate Config until it needs to be updated. 2. Collapsing `r.WithContext(ctx)` calls with the context handler.
847f47d
to
8d3017d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spotted tiny nit, sorry; lgtm otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: julz, vagababov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Proposed Changes
The current store implementation has 5 allocations in its HTTP Middleware
r.WithContext(ctx)
This reduces the footprint of the store to just one allocation by
r.WithContext(ctx)
calls with the context handler.Release Note
/assign @julz @vagababov