perf: populate route match context once across entries#44663
perf: populate route match context once across entries#44663rudrakhp wants to merge 1 commit intoenvoyproxy:mainfrom
Conversation
f7f167e to
13f679c
Compare
|
doesn't this introduce aditional overhead in the case where none of these matches are being performed on routes? for example if no query param matching is used, we currently don't even parse it, we would now do so. maybe it would be best to lazily initialize the fields of the context when needed? #20609 also suggested doing this lazily |
|
You’re right. I initially went with that approach, but it introduced a |
13f679c to
4b7b9ea
Compare
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>
4b7b9ea to
0258ffb
Compare
ravenblackx
left a comment
There was a problem hiding this comment.
For a change whose purpose is perf, it would be nice to include some benchmark tests, and the before/after results in the PR description.
Commit Message:
perf: populate route match context once across entriesAdditional Description: In case of multiple route entries these values are evaluated per route today which can be done only once to save compute.
Risk Level: Low
Testing: Existing tests + unit tests
Docs Changes: N/A
Release Notes: No
Platform Specific Features: N/A
[Optional Runtime guard:]
Fixes #20609