<div dir="ltr"><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>The compiler version will be defined by the user, in OpenSim.ini. For example:</div><div><br></div><div>[XEngine]</div><div>...</div><div> ;; The current version of the compiler (e.g., the version of OpenSim from Git)</div>
<div><div> CompilerVersion = "94d3076"</div></div><div><br></div><div>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.</div>
<div><br></div><div>The filenames would look like this (notice the compiler version at the end):</div><div><br></div><div>CommonCompiler_compiled_14d3d7a9-0e3b-456d-8f09-54a31b5b2a22_94d3076.dll</div><div><br></div><div>
<br></div><div>Any thoughts?</div><div><br></div><div>-- <br><div dir="ltr">Oren Hurvitz<br>VP R&D<br>Kitely Ltd.<br></div></div></div>