[Ironruby-core] [IronPython] Hosting DLR under ASP.NET

Jimmy Schementi Jimmy.Schementi at microsoft.com
Tue Feb 2 12:53:12 EST 2010

Recreating them on each call is OK for really simple script usages, since multiple requests of an ASP.NET app run in the same CLR instance, and the result of ScriptRuntime.GetEngine("langName") is cached, so the app will only incur a performance hit (because of the language's assemblies JITing) on the first request. However, if you want to keep some state around, let's say by defining some functions or importing a library for your script code to use, then you'll want to at least keep track of a ScriptScope, and then you might as well keep track of a ScriptEngine as well. You can store those anywhere you'd normally store things that need to persist between requests.


> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Marco Parenzan
> Sent: Tuesday, February 02, 2010 5:09 AM
> To: ironruby-core at rubyforge.org; users at lists.ironpython.com
> Subject: [IronPython] Hosting DLR under ASP.NET
> Dear All,
> are there any advices about hosting DLR under ASP.NET for scripting? (not for
> views!)?
> Where hosting ScriptingRuntime, ScriptingEngine?
> As static variables in Global.asax? In Application?
> Where hosting ScriptingScope? In Session? Destroy and reistantiate at each
> call?
> I have to develop an ASP.NET MVC application, with no serious performance
> issues, but I don't want to abuse...
> Thanks in advance
> 	Marco Parenzan
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

More information about the Ironruby-core mailing list