We don't have any support for object pooling built-in.

Have you considered having 1 ScriptRuntime/ScriptEngine for all requests?  You 
could load & compile each piece of code once (so cache any 
ScriptSource's/CompiledCode objects), and then create a new ScriptScope for 
each execution to run the code against.  That way you're not doing much work 
per-request but individual script's state is isolated in the ScriptScope.  I 
believe this is what the dynamic language support for ASP.NET does in the 
ASP.NET Futures and we do have some stress tests making sure that works.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dody Gunawinata
Sent: Thursday, July 17, 2008 1:58 AM
To: Discussion of IronPython
Subject: [IronPython] Object Pooling of IronPython 2.0 engine

I have a scenario in which I need to execute multiple python scripts within a 
single HTTP request. Right now I create a new instance of the engine for every 
single HTTP request and use the engine to service those requests.

This works fine except that the whole stack breaks down in moderate traffic and 
I start getting a bunch errors.

Is there any facility within the hosting API to support object pooling or do I 
have to implement them myself? Is object pooling an appropriate solution for 
this type of scenario at all?

Dody G.

--
nomadlife.org<http://nomadlife.org>
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to