An expression binding can dereference entries in a document tag much faster and more efficiently that jython can. runScript()
and friends have substantial startup overhead. If MiRData.robots
is composed of python-standard lists and/or dictionaries, it is directly assignable to a document tag.
You might find this topic useful:
Among other things, it's objectScript()
expression function includes a shortcircuit for referencing project library top-level objects without actually launching a jython interpreter. That is, instead of:
runScript("MiRData.getrobot",5000,{path.to.index},{path.to.key})
You could use:
objectScript("MiRData.robots")[{path.to.index}][{path.to.key}]
But this is probably best:
{path/to/MiRData/robotsDocumentTag}[{path.to.index}][{path.to.key}]
Note the use of an expression binding's []
operator for list or map dereferencing.
(You can wrap these expressions with timeMe()
to compare performance.)