Skip to content

Avoid repeated calls to getPathWithinApplication from UrlPathHelper.getLookupPathForRequest #25669

@LukeButters

Description

@LukeButters

After looking at:
Screenshot_20200901_084804
I think an easy optimisation exists UrlPathHelper.getLookupPathForRequest(HttpServletRequest).

I notice that it calls getPathWithinServletMapping which calls getPathWithinApplication, later it decides it is not happy with the result and so calls getPathWithinApplication again.

I suspect it should be easy enough to change getLookupPathForRequest to first call getPathWithinApplication then pass that into getPathWithinServletMapping, if that doesn't return a satisfactory result return the already computed value of: getPathWithinApplication

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