|
There’s also the possibility of
using the new Compile & Execute APIs to pre-compile the script once and
then execute it over and over again. Those were added in beta 1 to help
improve this (I’m not sure if this will work in this specific scenario,
but it’s a thought). The canonical host sample sounds like a
good idea – I’ve gone ahead and logged a bug in our database but right
now that will have to remain as a slightly lower priority. From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Pliszka Hi, I had similar problems. I think major
problem that I see with your code is that you create a new PythonEngine object
every time you execute new script. I suggest caching the PythonEngine object or
using object pooling. I also think the setVariable might be not releasing the
object. I also suggest you download .Net profiler
and run your code under that profiler. Then you should be able to pinpoint what
objects are consuming the memory. Knowing what objects are causing the leaks,
try to find different way to implement them and test again. Also take a look at last two months of the
mailing list and you should find some answers on how to run scripts
without leaking memory. There are some problems with memory usage
by IronPython, but developers are doing a very good job to fix those problems. I think we also need a architectural
blueprint of a stable, reliable IronPython scripting host, that people could
use as a guideline. I see that more and more people would like to use
IronPython as a server scripting host. Thanks Andrew
|
_______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
