<div dir="ltr">I did all the ScriptSource/Compiled object caching but this singleton ScriptEngine approach. I&#39;ll try that. Thanks.<br><br><br>Dody G.<br><br><div class="gmail_quote">On Thu, Jul 17, 2008 at 5:48 PM, Dino Viehland &lt;<a href="mailto:dinov@exchange.microsoft.com">dinov@exchange.microsoft.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">We don't have any support for object pooling
built-in.&nbsp; </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Have you considered having 1 ScriptRuntime/ScriptEngine for all
requests?&nbsp; You could load &amp; 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.&nbsp; That way you're
not doing much work per-request but individual script's state is isolated
in the ScriptScope.&nbsp; I believe this is what the dynamic language support
for <a href="http://ASP.NET" target="_blank">ASP.NET</a> does in the <a href="http://ASP.NET" target="_blank">ASP.NET</a> Futures and we do have some stress tests making
sure that works.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a> [mailto:<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>] <b>On
Behalf Of </b>Dody Gunawinata<br>
<b>Sent:</b> Thursday, July 17, 2008 1:58 AM<br>
<b>To:</b> Discussion of IronPython<br>
<b>Subject:</b> [IronPython] Object Pooling of IronPython 2.0 engine</span></p>

</div><div><div></div><div class="Wj3C7c">

<p>&nbsp;</p>

<div>

<p>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.<br>
<br>
This works fine except that the whole stack breaks down in moderate traffic and
I start getting a bunch errors.<br>
<br>
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?<br>
<br>
Dody G.<br clear="all">
<br>
-- <br>
<a href="http://nomadlife.org" target="_blank">nomadlife.org</a></p>

</div>

</div></div></div>

</div>


</blockquote></div><br><br clear="all"><br>-- <br><a href="http://nomadlife.org">nomadlife.org</a><br>
</div>