Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
8.7.0, 9.0.0-M5
-
None
-
None
Description
Profiling in production showed that ServletWebRequest.getUrl() and ServletWebRequest.getClientUrl() are called many times during request processing and allocate a lot of objects.
Each call to ServletWebRequest.getUrl() creates a new Url object that internally creates two new ArrayLists.
ServletWebRequest.getClientUrl() creates a new URL and involves a lot of complex parsing logic.
Both methods are invoked during request mapping. We have about 350 registered mappers, so these methods are called at least 350 times on each request.
Both values should be cached.
Attachments
Issue Links
- is related to
-
WICKET-6709 Cache the value of WebRequest#isAjax()
- Resolved