This project is read-only.

Fwd: FW: Performance Profile: Latest drop of dasblog?

Sep 1, 2009 at 12:31 AM
Check this out guys...who wants to update DasBlog with SGEN'd assemblies? Perhaps we can add it to build.bat?

Making this change will REALLY speed up DasBlog's startup time...

- ScottHa

Here is some early data. I’ll take a more detailed look this coming week.


Scenario: dasblog 2.3 installed. Made initial http requests to “warm up” the tempASPNET directory force BIN DLLs to be shadow copied and compile any dynamic .aspx pages.

REBOOTed machine to clear filesystem cache.

 

I am using xperf, windbg w/sos and CLR Profiler to gather data.

 

Process Timeline:

A - W3WP.EXE – Startup

I see that XmlSerializers are regenerating (and firing off multiple csc.exe and cvtres.exe instances) … see #1 below.

Same for restarts … see C below.

 

Are you dasblog folk using sgenexe to pre-generate the XmlSerializer classes at build time?

 

btw I first picked up on this when looking at large strings in the GC Heap using windbg sos … I saw that the dynamically generate C# code (in a String) for XmlSerializationWriterSiteConfig had generate a 396K string (see #2 below). I have seen a number of large 100K+ Strings in the GC Heap for XmlSerializers … creating memory pressure.

 

From MSDN: Sgen.exe XML Serializer Generator creates an XML serialization assembly for types in a specified assembly in order to improve the startup performance of a XmlSerializer when it serializes or deserializes objects of the specified types.)

 

B – TOUCH.EXE - Touch web.config to force AppDomain to recycle.

C – W3WP.EXE – ReStart. Make request in new appdomain in existing w3wp.exe

csc.exe and cvtres.exe relaunched.

 

#1 XPERF: Process lifetime

 

#2 WINDBG SOS

 

!dumpobj 0ba7a498

Name: System.String

MethodTable: 677888c0

EEClass: 6754a498

Size: 405522(0x63012) bytes

 (C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)

String: #if _DYNAMIC_XMLSERIALIZER_COMPILATION

 

[assembly:System.Security.AllowPartiallyTrustedCallers()]

 

[assembly:System.Security.SecurityTransparent()]

 

#endif

 

[assembly:System.Reflection.AssemblyVersionAttribute("2.3.9074.18820")]

 

namespace Microsoft.Xml.Serialization.GeneratedAssembly {

 

 

    public class XmlSerializationWriterSiteConfig : System.Xml.Serialization.XmlSerializationWriter {