[Mono-list] can i pre-compile *.asmx for mod-mono-server2?

Kornél Pál kornelpal at gmail.com
Sun Jan 13 14:47:10 EST 2008


You should use AOT for your DLL file(s).

See http://www.mono-project.com/AOT for details.

Kornél

----- Original Message ----- 
From: "aztlan2k" <aztlan2k at gmail.com>
To: <mono-list at lists.ximian.com>
Sent: Sunday, January 13, 2008 7:01 PM
Subject: Re: [Mono-list] can i pre-compile *.asmx for mod-mono-server2?


>
> Thanx Kornél,
>
> It's not really the source code that I want to hide... it's simply wanting
> to rid myself of the initial delay that is felt when the web services are
> accessed for the first time (because of the compilation having to occur).
> On my system, that compilation time can take anywhere between 15-20
> seconds... and after that, every access is only 1 sec or less.  I woiuld
> like all accesses, including the first, to be as fast.
>
> Thanx for you reply.
>
> /r/
>
>
>
> Kornél Pál-2 wrote:
>>
>> Hi,
>>
>> There are two different kinds of precompilation:
>> 1. source-to-il (processor independent byte code): this is what C#
>> compiler
>> does
>> 2. il-to-native (processor specific byte code): this is what the runtime
>> (with AOT) does
>>
>> If you don't want to distribute your source code just don't put it to the
>> .asmx file. Compile a .dll assembly put it to the bin directory and only
>> reference the type name in the .asmx file.
>>
>> AOT (ahead of time) compilation creates native code on the disk but JIT
>> (just in time) compilation that creates native code only in memory is
>> faster
>> for several cases.
>>
>> So I suggest you to put your code to a DLL file and only reference the
>> type
>> name in the .asmx file.
>>
>> Kornél
>>
>> ----- Original Message ----- 
>> From: "aztlan2k" <aztlan2k at gmail.com>
>> To: <mono-list at lists.ximian.com>
>> Sent: Sunday, January 13, 2008 6:38 AM
>> Subject: [Mono-list] can i pre-compile *.asmx for mod-mono-server2?
>>
>>
>>>
>>> I've searched the Net and found a few bits of information here and 
>>> there,
>>> but
>>> nothing solid, so I thought I'd ask here.  I hope  I didn't just miss 
>>> the
>>> answer in plain view somewhere...
>>>
>>> Is it possible to pre-compile my *.asmx files so that I don't take that
>>> initial compilation hit on first access to my web services?  (something
>>> along the lines of 'mono --aot' but for mod-mono-server )
>>>
>>> I ran across a post that recommended simply accessing the pages with 
>>> wget
>>> before presenting them to the outside world, which I suppose would work,
>>> but
>>> I was wondering if there might be a more direct approach?  This method 
>>> is
>>> a
>>> bit of a workaround to a problem i would think there'd be a read 
>>> solution
>>> to.
>>>
>>> I appreciate any and all tips!  Thanx!
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/can-i-pre-compile-*.asmx-for-mod-mono-server2--tp14782554p14782554.html
>>> Sent from the Mono - General mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> Mono-list maillist  -  Mono-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/can-i-pre-compile-*.asmx-for-mod-mono-server2--tp14782554p14788843.html
> Sent from the Mono - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 



More information about the Mono-list mailing list