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