ExpressionScript Engine roadmap

This page is for tracking the development status and TODO lists for ExpressionScript Engine

=Status=

EM was introduced in version 1.92+ (released in March 2012). Since then it is a part of every LimeSurvey distribution.

=Wish List for EM-Related Enhancements=
 * Enhance Expression Manager
 * Optimize LimeSurvey for Long Surveys and better performance and maintenance in general

=Performance Tuning Notes=

ExpressionScript Engine can be called dozens to hundreds of times per page. Instead, it should be possible to concatenate together the roughly tailored parts of the survey page and call Expression Manager once per page (or at least fewer times).

To accomplish this, two things are needed:
 * 1) Ensure that all replacement values are correct when called. Some values like {QUESTION} change multiple times per page. Others are constant across all pages.
 * 2) Find a way to concatenate together all page components prior to calling ExpressionScript Engine.

For values that change multiple times per page (like {QUESTION}), I'd like to replace calls to templatereplace, replaceTokens, insertAnsReplace, dTexts, and replaceFields (several of which call ExpressionScript Engine) as follows:
 * Templates: (except for Group and Question) - return as they are so they get processed at the end;
 * Group Template: Replace {GROUP} with something like {GROUP_N} which ExpressionScript Engine would then substitute at the end;
 * Question Template: Replace {QUESTION} and {ANSWER} with something like {QUESTION_N} and {ANSWER_N} which would also get replaced after the whole page was composed.

When are each of the following attributes changed?
Here are the possibilities:
 * global - means that the value is global for the LimeSurvey instance (across all surveys and sessions);
 * survey - means each survey might have a different value;
 * session - means the value should be static across a given session
 * page - means that the value on each page might differ
 * group - means might differ for each group
 * questions - means might differ for each question
 * answer - means  might differ for each answer option
 * no processing needed - means EM should only do a plain replace on these, no processing of the contents

Where within LimeSurvey is each Keyword Used?
A green 1 means that the keyword is used in that file at least once.