-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Performance regression with echo 4.2.0
#1777
Comments
Just ran the benchmarks of tags v4.1.17 and v4.2.0 against each other and the impace is different here. Result of runnung 10 times and compare using
When I do the same using web-framework-benchmark I get similar results as you showed before. |
Seems like I was the one doing a perf review of PR #1628 and also wrote that I did not see a performance regression.. |
AFAIK the benchmark tests in the echo repo only test the performance of the router itself by directly calling the find method on it, whereas the web-framework-benchmark benchmarks the whole echo stack. Seems like the regression has been introduced between the other parts and the find call on the router and not in the router itself. |
PR #1628 introduced So this PR needs to be revisited if this is required for every request or could be limited to proxying. |
@lammel Isn't PR #1628 even a breaking change for route finding? Assuming a user has registered the following route: e.Any("/test whitespace/", myHandler) If the user enters the URL |
You are probably right, es the paths added to the router would also need to use I still think we should limit the implications of path escaping to appropriate places (e.g. proxy as the other PR originally stated). |
Issue Description
We have just updated to echo 4.2.0 and have seen a relatively high performance regression with that release. With bisecting
it seems like commit 2d79ff3 has introduced a perfomance penalty of about 30-40%.
The following benchstat has been generated with https://github.com/vishr/web-framework-benchmark comparing commit
cf2fcad to 2d79ff3.
Steps to reproduce
Run https://github.com/vishr/web-framework-benchmark benchmark with commit 2d79ff3 and cf2fcad
Version/commit
4.2.0
first commit with regression 2d79ff3The text was updated successfully, but these errors were encountered: