c# - Why is Unity (P&P) loading very slow in Windows XP 64 bit SP2? -


i've created new windows forms .net v3.5 solution , added patterns , practices unity references following command using package manager console on visual studio:

install-package unity -version 2.1.505.2

to simplify, little app doesn't trying instantiate unitycontainer in loading method:

private void form1_load(object sender, eventargs e) {     stopwatch stopwatch = stopwatch.startnew();     new unitycontainer();     stopwatch.stop();     debug.writeline(string.format("winforms unity initialization took {0}", stopwatch.elapsed));     this.close(); } 

on windows 7 runs quickly, process exits in less second. stopwatch log shows less millisecond instantiate unity.

in windows xp 64 bit sp2 experience time of 30 seconds until little app quits, debug log still shows instantiating unity took less millisecond.

so thought maybe long time has jit compiler producing native code unity's il code:

i've used ants performance profiler in order determine methods taking long execute , saw form1_load method takes in total 32 seconds,

which contain jit overhead of 30 seconds, contains "waiting synchronization" of 30 seconds.

hovering on shows tooltip says:

this node shows executing thread blocked period of time. example, thread may have been sleeping, or waiting access shared resource.

i guess means loading/jiting unity takes long on windows xp. tried use ngen create native image of little app, things same without using native image.

someone knows whats taking long unity load in xp ?

the dlls three:

microsoft.practices.servicelocation.dll 30 kb

microsoft.practices.unity.configuration.dll 85 kb

microsoft.practices.unity.dll 122 kb

and in release, x86 (that's how got them package manager)


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -