-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Improve performance of the access logger when its disabled #9822
Conversation
Most of the time in the access logger is spent calling clock_gettime, move the check to see if its enabled to an enabled property so we do not have to fetch time and throw it away
Most of the time in the access logger is spent calling clock_gettime, move the check to see if its enabled to an enabled property so we do not have to fetch time and throw it away
Most of the time in the access logger is spent calling clock_gettime, move the check to see if its enabled to an enabled property so we do not have to fetch time and throw it away
CodSpeed Performance ReportMerging #9822 will not alter performanceComparing Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #9822 +/- ##
=======================================
Coverage 98.69% 98.70%
=======================================
Files 118 118
Lines 36015 36043 +28
Branches 4278 4282 +4
=======================================
+ Hits 35546 35575 +29
Misses 315 315
+ Partials 154 153 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Probably should make it |
OTOH logger tends to be expensive so an external logger might want to use this as well |
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.
Maybe None
access logger provides even less overhead?
Passing |
Pushed |
Looks to be ~2.4% speed up in the overall request time. |
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.
Got you. LGTM.
Thanks for the look! |
Backport to 3.11: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 249df6e on top of patchback/backports/3.11/249df6e1599db75a94dc95f63c498545358f6ef8/pr-9822 Backporting merged PR #9822 into master
🤖 @patchback |
(cherry picked from commit 249df6e)
…ogger when its disabled (#9828)
What do these changes do?
Most of the time in the access logger is spent calling
clock_gettime
, move the check to see if its enabled to anenabled
property so we do not have to fetch time and throw it away.Are there changes in behavior for the user?
no
Is it a substantial burden for the maintainers to support this?
no