Skip to content

Conversation

@etr
Copy link
Owner

@etr etr commented Jan 23, 2019

Description of the Change

Removed frequent call to regex compile - thus saving CPU time. This was discovered through callgrind that pointed at regex compilation happening during URL normalization. The resulting code improves average time to serve requests by ~15% (during the load tests performed as part of the travis builds) and ~50% improvement in TP99 on INTERNAL_SELECT.

Quantitative Performance Benefits

It is possible to observe the performance improvement in output of the following travis builds:

Possible Drawbacks

None real.

Verification Process

Tested using travis.

Applicable Issues

None

Release Notes

Reduced the CPU time spent in normalizing URLs (thus saving ~15% on average per request).

@etr etr self-assigned this Jan 23, 2019
@etr etr added the performance Related to performance. label Jan 23, 2019
@codecov-io
Copy link

Codecov Report

Merging #141 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #141      +/-   ##
=========================================
+ Coverage    96.1%   96.1%   +<.01%     
=========================================
  Files          34      34              
  Lines        2951    2956       +5     
=========================================
+ Hits         2836    2841       +5     
  Misses        115     115
Impacted Files Coverage Δ
test/unit/http_utils_test.cpp 100% <100%> (ø) ⬆️
src/http_utils.cpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e471d21...8083b79. Read the comment docs.

@etr etr merged commit 0bafefc into master Jan 23, 2019
@etr etr deleted the reduce_regex_usage branch January 30, 2019 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Related to performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants