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

perf(router) if header matching is not used, don't read headers #9327

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

bungle
Copy link
Member

@bungle bungle commented Aug 26, 2022

Summary

Optimize traditional_compatible and expressions router to not read headers in case there are no routes with header matching rules.

@bungle bungle requested review from dndx and chronolaw August 26, 2022 15:05
@bungle bungle requested a review from a team as a code owner August 26, 2022 15:05
@bungle bungle force-pushed the perf/router-header-matching branch 3 times, most recently from 6b27621 to e7ed0eb Compare August 26, 2022 15:29
@bungle bungle changed the title perf(router) if header matching is not used, don't read headers on traditional_compatible perf(router) if header matching is not used, don't read headers Aug 26, 2022
@bungle bungle added pr/wip A work in progress PR opened to receive feedback and removed pr/please review labels Aug 26, 2022
@bungle bungle force-pushed the perf/router-header-matching branch from e7ed0eb to c50220b Compare August 28, 2022 17:39
### Summary

Optimize `traditional_compatible` and `expressions` router to not read
headers in case there are no routes with header matching rules.
@bungle bungle force-pushed the perf/router-header-matching branch from c50220b to 4259777 Compare August 29, 2022 07:40
@bungle bungle added pr/ready This PR is considered ready and can be merged at anytime (given it received no subsequent changes) and removed pr/wip A work in progress PR opened to receive feedback labels Aug 29, 2022
@bungle bungle merged commit e6e0e53 into master Aug 29, 2022
@bungle bungle deleted the perf/router-header-matching branch August 29, 2022 08:05
bungle added a commit that referenced this pull request Aug 31, 2022
### Summary

Optimize `traditional_compatible` and `expressions` router to not read
headers in case there are no routes with header matching rules.
# Conflicts:
#	kong/router/atc_compat.lua
bungle added a commit that referenced this pull request Aug 31, 2022
### Summary

Adds missing tests to perf pr that was recently merged, see: #9327.

This tests that `ngx.reg.get_headers` is called only when there are
routes with header matching rules.
jschmid1 pushed a commit that referenced this pull request Sep 1, 2022
### Summary

Adds missing tests to perf pr that was recently merged, see: #9327.

This tests that `ngx.reg.get_headers` is called only when there are
routes with header matching rules.
chronolaw added a commit that referenced this pull request Sep 2, 2022
chronolaw added a commit that referenced this pull request Sep 8, 2022
chronolaw added a commit that referenced this pull request Sep 21, 2022
chronolaw added a commit that referenced this pull request Sep 26, 2022
chronolaw added a commit that referenced this pull request Oct 6, 2022
chronolaw added a commit that referenced this pull request Oct 9, 2022
dndx pushed a commit that referenced this pull request Oct 10, 2022
* rename `atc_compat.lua` to `compat.lua`
* add a new file `expressions.lua`
* move lots of logic into `atc.lua`
* rename `get_atc` to `get_expression`
* rename `route_priority` to `get_priority`
* rename `atc_escape_str `to `escape_str`
* remove function `paths_resort`
* transplant #9327 
* transplant #9329 
* transplant #9343
* transplant #9346
* transplant #9357
* transplant #9389
* transplant #9394
* transplant #9451
* transplant #9480
oowl pushed a commit to oowl/kong that referenced this pull request Oct 12, 2022
* rename `atc_compat.lua` to `compat.lua`
* add a new file `expressions.lua`
* move lots of logic into `atc.lua`
* rename `get_atc` to `get_expression`
* rename `route_priority` to `get_priority`
* rename `atc_escape_str `to `escape_str`
* remove function `paths_resort`
* transplant Kong#9327 
* transplant Kong#9329 
* transplant Kong#9343
* transplant Kong#9346
* transplant Kong#9357
* transplant Kong#9389
* transplant Kong#9394
* transplant Kong#9451
* transplant Kong#9480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/ready This PR is considered ready and can be merged at anytime (given it received no subsequent changes) size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants