[Mono-list] ASP.Net Page taking minimum 11 sec to load first time

Mike Cleaver mike at moga.to
Wed May 28 20:36:06 EDT 2008


I agree that the performance is fine once compiled, and its not a  
major concern in a production environment where batch compilation  
works.  Unfortunately I have two issues at the moment -

1) Batch compilation is not running from my site, maybe i have  
configured that in my web.config, im not sure. Will look into it today.

2) On osx, when i modify an aspx file, it is not recompiled so I have  
to restart xsp2 to see my changes.  I have put a little effort into  
checking if this is a known bug, if it isn't a known bug I'll submit a  
report for it but not sure how I'd present a test case.

I'm definitely going to look into batch compilation today, will post  
when I've enabled it..

Cheers,
Mike Cleaver


On 29/05/2008, at 12:34 AM, Daniel Nauck wrote:

> Hello,
>
> why do you care about the speed of the initial request?
> Its only a one-time delay.
>
> I'm hosting some not pre-compiled larger asp.net websites and mono  
> is as fast as .net in a subjective point of view.
>
> There is nothing to complain about on mono.
>
> Daniel
>
> Stéphane Zanoni schrieb:
>> Not really sure, but can you not use ngen to pre-JIT?  Should drop  
>> the
>> start time considerably?
>> Stéphane
>>>>> Marek Habersack <grendello at gmail.com> 5/28/2008 10:16 AM >>>
>> On Wed, 28 May 2008 15:56:33 +0800
>> Mike Cleaver <mike at moga.to> wrote:
>>> This is an issue that we have too, we have no code behind, just  
>>> plain
>>
>>> ASPX files used as views for a MVC style system.  The compilation
>> time
>>> looks to me to be basically 1 second per ASPX/ASCX file regardless  
>>> of
>>
>>> complexity (core2 6400/osx).  So our main page has a master page and
>> 3
>>> controls on it, giving it about 5 seconds of time to compile on  
>>> first
>>
>>> view.
>> That's how ASP.NET works. It's the same on MS .NET. Upgrading to mono
>> 1.9 will give
>> you batch compilation, which will make the initial compilation time a
>> bit longer but
>> further requests will be a bit faster, in turn.
>>
>>> Back in april Miguel posted:
>>>> Compiler hosting inside ASP.NET: This will embed the whole compiler
>>
>>>> into the ASP.NET process, eliminating about one second for each   
>>>> compilation of a piece of code. In the past, for each request for
>> an
>>>> uncompiled resource, we would have to call the compiler, wait for
>>>> its output and then load the output. This typically shaves between
>>>> 0.7 to 1 second on those scenarios, ideal to improve the developer
>>>> experience.
>>> Any news on that front? It sounds like exactly the solution I'm
>> after!
>> This won't change much. There will still be initial compilation which
>> will still
>> take time. Since with 1.9+ the files are compiled in a batch, you  
>> will
>> possibly gain
>> 1s. Again, this is just the very first request that gets the
>> performance hit.
>> regards,
>> marek
>>> On 28/05/2008, at 12:37 AM, Marek Habersack wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> On Wed, 21 May 2008 02:54:22 -0700 (PDT)
>>>> haaroon <haaroons at gmail.com> wrote:
>>>>
>>>>> Hi,
>>>> Hi,
>>>>
>>>>> I am new to this forum. I am doing porting mono to my Linux   
>>>>> embedded system
>>>>> and my system Spec as follows...
>>>>>
>>>>> Hardware: -
>>>>> CPU = x86
>>>>> CPU Speed =500MHZ
>>>>> RAM =512MB
>>>>>
>>>>> Software Version: -
>>>>> Kernel Version 2.0.31
>>>>> Mono 1.2.4
>>>> You should consider upgrading your mono to 1.9
>>>>
>>>>> Mod-mono 1.9
>>>>> Apache 2.2.8
>>>>>
>>>>> After porting the ASP.Net Page taking minimum 11 sec to load first
>>
>>>>> time. And
>>>>> second time onwards its coming faster. Once I rebooted my
>> system
>>>>> the entire
>>>> That's how ASP.NET works. On the first request it generates source
>>>> from all the
>>>> referenced .as?x files and compiles it on the fly. Further requests
>>
>>>> don't need that
>>>> step so they are faster.
>>>>
>>>>> compiled library is flushed by the system and I have to recompile
>> the
>>>>> ASP.Net pages once again. Is there any way to hard code the
>> library
>>>>> or is
>>>>> there any way to improve the speed of my system performance?
>>>> You can compile your code-behind to an assembly and store the   
>>>> assembly in the bin/
>>>> subdirectory of your website instead of using CodeFile inside   
>>>> the .as?x files and
>>>> code in the App_Code/ subdirectory of your web site. This will make
>>
>>>> the first
>>>> startup time slightly faster.
>>>> There is no support for preserving the assemblies compiled from the
>>
>>>> generated
>>>> sources across application restart/server reboot.
>>>>
>>>> marek
>
> _______________________________________________
> 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

Mike Cleaver
mike at moga.to





More information about the Mono-list mailing list