[Opensim-dev] Proposal: cache compiled scripts across server restarts
Oren Hurvitz
orenh at kitely.com
Sun Jun 19 09:27:35 UTC 2011
XEngine currently caches compiled scripts in the "ScriptEngines" directory,
so it only has to compile each script once, even if it's used many times.
However, whenever OpenSim starts XEngine deletes all the previously-compiled
scripts, which means they need to be recompiled. This makes region startup
slow if the region has many scripts.
I propose keeping cached scripts even across OpenSim restarts. The only
challenge is to make sure scripts are recompiled if the script engine has
changed. To do so, I'll append the compiler version to the compiled assembly
filename. When XEngine starts, instead of deleting *all* the compiled
scripts it will only delete scripts whose version doesn't match the current
version.
The compiler version will be defined by the user, in OpenSim.ini. For
example:
[XEngine]
...
;; The current version of the compiler (e.g., the version of OpenSim
from Git)
CompilerVersion = "94d3076"
The default value would be an empty string, which means that the compiler
version is undefined. In that case XEngine will continue to use the current
logic, i.e. delete all the compiled scripts whenever OpenSim is started. I
expect most casual users will keep the default value, so they will see no
change from the current behavior. However, more advanced users who have a
standard process to upgrade OpenSim (e.g., me ;) ) will be able to improve
caching using this mechanism.
The filenames would look like this (notice the compiler version at the end):
CommonCompiler_compiled_14d3d7a9-0e3b-456d-8f09-54a31b5b2a22_94d3076.dll
Any thoughts?
--
Oren Hurvitz
VP R&D
Kitely Ltd.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20110619/76384807/attachment-0001.html>
More information about the Opensim-dev
mailing list