[IronPython] Object Pooling of IronPython 2.0 engine

Dody Gunawinata empirebuilder at gmail.com
Fri Jul 18 10:05:15 CEST 2008

I did all the ScriptSource/Compiled object caching but this singleton
ScriptEngine approach. I'll try that. Thanks.

Dody G.

On Thu, Jul 17, 2008 at 5:48 PM, Dino Viehland <dinov at exchange.microsoft.com>

>  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:* users-bounces at lists.ironpython.com [mailto:
> users-bounces at lists.ironpython.com] *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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080718/517b3593/attachment.html>

More information about the Ironpython-users mailing list