[Mono-devel-list] Embedding Mono in a Virtual World
jimpurbrick at yahoo.co.uk
Wed Jan 26 07:21:36 EST 2005
--- Paolo Molaro <lupus at ximian.com> wrote:
> If the same scripts are run multiple times I'd
> expect a large performance improvement.
The scripts are event based and most of the time spent
executing scripts will be repeatedly calling the event
handlers of running scripts. Presumably each handler
will be JIT compiled the first time it's run and then
be running native code in subsequent calls.
The scripts are developed within the world, so some
copies of a script will be compiled and run only once,
but these will make up a tiny fraction of the running
scripts at any given time.
It will be important to unload scripts and JIT output
for scripts when they are no longer referenced so
there isn't a build up of compiled and JITed code
which will never be run again.
> So it very much depends on what is the behaviour of
> the scripts: you might want to have your system use
> the threadpool. [...] This works if the scripts are
> supposed to be short-lived.
Script lifetime is normally tied to the life cycle of
the object it is attached to.
A script might be developed at added to an object
which sits in the world for weeks and simply waits for
a user to touch the object. When the object is
touched, an event handler is called in the script
which responds to the object being touched.
Other scripts might repeatedly scan the area around
the object for users. In this case the script calls a
library function to perform the scan and an event
handler is called in the script when a user is
With the current interpretted system, event handlers
are called by the system and run until they exit or a
quanta has elapsed and then another script is
scheduled. Would a similar approach be possible using
Mono? Would it be a good way to go?
> You can look at the IronPython, Boo, or a number of
> other compilers that either emit IL code or use
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
More information about the Mono-devel-list