[ https://issues.apache.org/jira/browse/WICKET-6982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17537785#comment-17537785 ]
ASF GitHub Bot commented on WICKET-6982: ---------------------------------------- theigl merged PR #526: URL: https://github.com/apache/wicket/pull/526 > Unnecessary initialization of stateful pages in ListenerRequestHandler > ---------------------------------------------------------------------- > > Key: WICKET-6982 > URL: https://issues.apache.org/jira/browse/WICKET-6982 > Project: Wicket > Issue Type: Improvement > Components: wicket-core > Affects Versions: 9.10.0 > Reporter: Thomas Heigl > Assignee: Thomas Heigl > Priority: Major > Attachments: image-2022-05-16-11-49-09-093.png > > > 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: > !image-2022-05-16-11-49-09-093.png|width=427,height=213! > Forcing page initialization was originally introduced in WICKET-4116 in [this > commit|https://github.com/apache/wicket/commit/42a436235ff4ed60f1eaa0f406ea96aa63a6eb2e] > to fix an issue with expired pages and checking for statelessness. > In WICKET-5083, [this > commit|https://github.com/apache/wicket/commit/34f43642195058f375d161dbb7cec58b40711423] > 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. > > -- This message was sent by Atlassian Jira (v8.20.7#820007)