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

Refactor filtering to improve performance #10167

Merged
merged 4 commits into from
Dec 4, 2023
Merged

Refactor filtering to improve performance #10167

merged 4 commits into from
Dec 4, 2023

Conversation

dstepanov
Copy link
Contributor

  • Filter runner refactored to enable imperative methods invocation in a loop without multiple lambdas
  • Added more unwrapping flow checks for filters and route execution
  • Removed a need to have terminal filters
  • Changes modified some of the generics and signatures. Filters should work with non-mutable request/response with wildcard body type

*/
protected RequestLifecycle(RouteExecutor routeExecutor, HttpRequest<?> request) {
protected RequestLifecycle(RouteExecutor routeExecutor) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see it's passed around everywhere now, but what's the point of this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, it's clear how the request is processed, because it can be modified it's better to pass it with the flow and avoid mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brings back the param list inflation RequestLifecycle was made to avoid though...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel the code flow is more transparent and more accessible to understand this way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough

Copy link

sonarqubecloud bot commented Dec 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

91.6% 91.6% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants