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

Unnecessary initialization of stateful pages in ListenerRequestHandler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 9.10.0
    • 10.0.0, 9.12.0
    • wicket-core
    • None

    Description

      ListenerRequestHandler currently forces initialization of pages. For already initialized stateful pages, this traverses the entire component hierarchy. For large pages, this can be a costly operation.

      My profiler shows a significant amount of CPU load coming from these unnecessary traversals:

      Forcing page initialization was originally introduced in WICKET-4116 in this commit to fix an issue with expired pages and checking for statelessness.

      In WICKET-5083, this commit added the same forced initialization directly to Page.isPageStateless().

      I think we can get rid of the initialization in ListenerRequestHandler and rely on the conditional logic in Page.isPageStateless to trigger initialization if necessary.

       

       

      Attachments

        1. image-2022-05-16-11-49-09-093.png
          133 kB
          Thomas Heigl

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: