Velocity
  1. Velocity
  2. VELOCITY-662

EventHandler.referenceInsert performance bottleneck

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      The times resulting from SimpleNode.literal, StrBuilder.append (the top two) and EventHandlerUtil.referenceInsert are due to the following line in ASTReference.render:

      value = EventHandlerUtil.referenceInsert(rsvc, context, literal(), value);

      Which accounts for nearly 25% of the time, Ouch! Not to mention the many number of StrBuilder objects created. (StrBuilder is called from within literal()) We are always taking the hit for this call even if there is no event handler installed. I havn't looked into it, but will probably just put a conditional around it.

        Activity

        Byron Foster created issue -
        Byron Foster made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12449416 ] Default workflow, editable Closed status [ 12551519 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551519 ] jira [ 12552406 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Byron Foster
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development