Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-13672

Optimize compilation of MVEL expressions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.8
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Automation

      Description

      Some MVEL expressions are compiled without any parsing context, which is an issue for performance.

      The documentation at http://mvel.codehaus.org/MVEL+2.0+Typing explains how to configure this.

      Problem is visible in MvelExpression#eval and MvelTemplate#eval for instance, as the expression is compiled there without any context:

      MVEL.compileExpression(expr);
      
      TemplateCompiler.compileTemplate(expr)
      

      Other parts of the code might need the same optimizations, like the ones in class scripting:

      public static MvelScript compile(String script) {
          return new MvelScript(MVEL.compileExpression(script));
      }
      

      Scripting#newExpression and Scripting#newTemplate methods would also need to be updated, API changes will be required.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: