0 Replies Latest reply on May 9, 2008 1:24 PM by (GordonSmith)

    [svn] 1648: This checkin makes public our modifications to Velocity 1. 4 which make the parse tree serializable.

    Level 1
      Revision: 1648
      Author: gosmith@adobe.com
      Date: 2008-05-09 14:24:44 -0700 (Fri, 09 May 2008)

      Log Message:
      -----------
      This checkin makes public our modifications to Velocity 1.4 which make the parse tree serializable.

      Velocity has a slow parser and template lookup mechanism so we save 25% time in the MXML compiler by only using merge at runtime and loading a serialized form of the parse tree from the classpath.

      There's a simple class flex.util.SerializedTemplateFactory that has a main method to serialize a template and a load method to load a template.

      Another significant change is that macros and their arguments are not parsed at runtime; we parse them once at parse time and they are just evaluated at runtime. The original Velocity liked to concatenate tokens in its production rules and then re-parse at runtime.

      It turns out that re-serializing the parse trees is still pretty expensive, so the next step would be to codegen a Java class that does all the velocity actions without any of the Velocity runtime necessary.

      Bugs: -
      QA: No
      Doc: No
      Reviewer: Jono

      Modified Paths:
      --------------
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/app/VelocityEngin e.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/Runtime.j ava
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/RuntimeCo nstants.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/RuntimeIn stance.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/RuntimeSe rvices.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/RuntimeSi ngleton.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/Velocimac roFactory.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/Velocimac roManager.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/directive /Foreach.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/directive /Include.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/directive /Macro.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/directive /VMProxyArg.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/directive /VelocimacroProxy.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/Pa rser.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/Pa rser.jj
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/Pa rser.jjt
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/To ken.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/bu ild
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTComment.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTDirective.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTEscape.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTEscapedDirective.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTIdentifier.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTMethod.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTNumberLiteral.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTReference.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTSetDirective.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTStringLiteral.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTText.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/ASTWord.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/Node.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/runtime/parser/no de/SimpleNode.java
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/org/apache/velocity/util/introspectio n/Info.java

      Added Paths:
      -----------
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/flex/
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/flex/util/
      flex/sdk/trunk/modules/thirdparty/velocity/src/java/flex/util/SerializedTemplateFactory.j ava