[Opensim-dev] Proposal: cache compiled scripts across server restarts

Melanie melanie at t-data.com
Sun Jun 19 10:36:48 UTC 2011


Hi,

that nwould break quite a few systems that people have created to manage the script files externally as well as having implications for script transfer between regions configured differently and therefore impact interop and heterogenous grids negatively.

There is an option already that stops Xengine fro. deleting the scripts on startup - if used, the user needs to take care of time based cleanup or risk scrip file bloat.

The compiler version does't really come into it, so there is no need for themechanism you describe and it would in fact be potentially harmful.

Melanie

On 19 Jun 2011, at 11:27, Oren Hurvitz <orenh at kitely.com> wrote:

> 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.
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev



More information about the Opensim-dev mailing list