You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Heigl (Jira)" <ji...@apache.org> on 2020/05/29 15:53:00 UTC

[jira] [Created] (WICKET-6795) Avoid needlessly splitting and joining strings in AjaxEventBehavior

Thomas Heigl created WICKET-6795:
------------------------------------

             Summary: Avoid needlessly splitting and joining strings in AjaxEventBehavior
                 Key: WICKET-6795
                 URL: https://issues.apache.org/jira/browse/WICKET-6795
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-core
    Affects Versions: 9.0.0-M5
            Reporter: Thomas Heigl
         Attachments: image-2020-05-29-17-44-38-188.png

{{AjaxEventBehavior.getEvent()}} splits JS event names on whitespace because the behavior can be bound to multiple events (i.e. "change click").

Since most behaviors are bound to a single event, this costly operation can be avoided by checking for whitespace before splitting and re-joining the strings.

More than 1s of my 30s test of rendering components with ajax behaviors was spent in this method:

!image-2020-05-29-17-44-38-188.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)