-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
Proposal to improve performance optimization of AbstractHandlerMethodMapping mapping matching #34461
Comments
Hello @conneyjoo and thanks for the detailed proposal. |
Thank you very much for your attention. In this document, I have listed benchmarks for two different specifications. I'm not sure if they match the "fewer and simpler endpoints" scenario you mentioned. If not, I can easily run another benchmark based on your specifications. The link above section 4 of the document. |
Can you share the implementation and JMH benchmark? |
Hello
First of all, thank you for your great work on Spring-WebMVC. The request mapping mechanism has served developers well over the years, and I really appreciate the thoughtfulness behind its design.
In a project with a large number of variable-style APIs, i am observed performance bottlenecks due to the linear search approach in RequestMappingHandlerMapping. To address this issue, I tried a hierarchical path matching mechanism that organizes the path in a structured way to narrow the search scope by splitting the path into multiple layers using the "/" symbol and utilizing the hierarchical structure to optimize the lookup process. This approach showed good results in optimizing lookup performance.
I am looking forward to whether this approach is in line with Spring's design principles, and if so, I will cooperate on how to improve it together to ensure that it fits well with the existing ecosystem. If this idea resonates, I will be happy to further refine the proposal based on feedback.
Thank you.
This is the detailed design document, which contains the code implementation, unit test,
AbstractHandlerMethodMapping
and optimized comparison JHM ReportThe text was updated successfully, but these errors were encountered: