Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6776

Cache Urls returned from ServletWebRequest

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 8.7.0, 9.0.0-M5
    • None
    • wicket-core
    • 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

          Activity

            People

              Unassigned Unassigned
              thomas.heigl Thomas Heigl
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: