Skip to content

RequestCondition optimizations #22644

Closed
Closed
@rstoyanchev

Description

@rstoyanchev

Introduce a common cache, e.g. RequestMappingInfoCache, that's stored as a request attribute (Spring MVC) or exchange attribute (WebFlux) to avoid repeated re-calculation of request related values required for condition checks.

There are already optimizations in WebFlux so request path, "Content-Type", and "Accept" are parsed only once, but even then "Accept" media types are sorted repeatedly + there are other recurring checks like isPreFlightRequest. This would allow Spring MVC be more on par with WebFlux in terms of optimal request condition checks.

A lot of the base functionality could be in AbstractRequestCondition with sub-classes accessing computeIfAbsent type methods from the base class.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions