One Script used by multiple engines #1302
-
Hi! To improve the performance of an Asp.Net application that uses scripting extensively, I would like to cache the Script objects instead of the script texts, which is what we're doing now. In short, is there any problem if the same Script instance is used to feed separate engines, each running in its own thread? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's safe to share |
Beta Was this translation helpful? Give feedback.
It's safe to share
Script
instance between engines, this is specifically known scenario and thus supported. Ideally you should useEngine.PrepareScript
(available in latest beta) to prepare the script, it will calculate things that would otherwise be calculated runtime and causing unnecessary overhead.