I am trying to improve javascript fragment evaluator performance. These script fragments can refer to any number of variables that exist in the string map of json-like object graphs (IE: Json AST). I use JDK 1.6 and the built-in Rhinocript engine (v1.6R2).
Currently processing takes the form of:
- Parses a fragment to find the names of reference variables
- Variables are extracted from the map and serialized to json string
- Json string is assigned to the same named variable at the beginning of the script
- Rate advanced script
I am trying to figure out how to skip the json serialization step and create direct Rhinocript siblings for placement in the 'bindings' for the script. Then the required steps are:
- Parses a fragment to find the names of reference variables
- Variables are extracted from the map and converted to native Rhinocript equivalents
- Own objects are placed in bindings
- Evaluate source script with specified bindings
Do you know where I can find documentation or examples of how to instantiate your own rhinocript?
My scala training project can be useful if you want to mess around. And any answer that I came up with should appear there too ...
http://subversion.assembla.com/svn/freshcode_public/learn_scala/datastore/src/test/scala/pkg/script
Thanks in advance.
source share