Skip to content

Logging performance bottleneck in DispatcherServlet / UrlPathHelper [SPR-7269] #11928

@spring-projects-issues

Description

@spring-projects-issues

Kenny MacLeod opened SPR-7269 and commented

DispatcherServlet.getLastModified constructs a new UrlPathHelper object each time it is called, which in turn calls LogFactory.getLog. Considering that DispatcherServlet.getLastModified is on the critical execution path, this adds up to a small but significant performance bottleneck.

From what I can see of UrlPathHelper, it should be threadsafe, and the DispatcherServlet should be able to keep a single instance as an object field, rather than instantiating a new one each time.


Affects: 3.0.2

Referenced from: commits eb3a3a6

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