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

Avoid needlessly splitting and joining strings in AjaxEventBehavior

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 9.0.0-M5
    • 9.0.0
    • wicket-core
    • None

    Description

      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:

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: