Add special command to warm up MVEL engine
This commit is contained in:
parent
323a47a744
commit
b65aa4cc8a
@ -113,6 +113,12 @@ public class DefaultMvelInvokeService extends AbstractScriptInvokeService implem
|
||||
parserConfig.addImport("JSON", TbJson.class);
|
||||
TbUtils.register(parserConfig);
|
||||
executor = MoreExecutors.listeningDecorator(ThingsBoardExecutors.newWorkStealingPool(threadPoolSize, "mvel-executor"));
|
||||
try {
|
||||
// Special command to warm up MVEL engine
|
||||
MVEL.compileExpression("var warmUp = {}; warmUp", new SandboxedParserContext(parserConfig));
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user