winforms controls take a long time to load in IE


G

Guest

Hi, I've created a very simple winforms control using the c# wizard in VS .net 2003 that is nothing but a System.Windows.Forms.UserControl. There are no other controls on the form

It takes IE 12 seconds to load this control into the page. CPU usage is at only 1% to 2% during the 12 sec
All of this is on a single machine

XP Pro sp1 (all critical updates loaded)
2.6GHz, P4, 512MB ra
IE v6.0.2800.1106.xpsp2.030422-1633
IIS 5.1
..net framework 1.1.4322.573 (my computer, intranet security set to "Full Trust"

Here is the html page I use to load it

<html><body><object id="SlowLoad1" classid="http:SlowLoad1.dll#SlowLoad1.UserControl1" height="500" width="500" VIEWASTEXT></object></body></html

The real control I'm trying to build takes over 40 seconds to load. I'm finding that it hangs when calling ResourceManager functions that load an imagelist, but finally it does load, and work once loaded

Worth noting that before running the test

- I cleared out everything under my user account\VSWebCach
- Removed everything under C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET File
- killed (auto restarted) aspnet_wp.ex

Here is a dump of the gac and dll loading when launching the web app from VS .net

Auto-attach to process '[2396] aspnet_wp.exe' on machine 'JJAHOME' succeeded
'DefaultDomain': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.thunk.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regularexpressions.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.thunk.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regularexpressions.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll', No symbols loaded
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\slowloadwebapp\f7c3f075\b19a58a7\assembly\dl2\2a9d5b70\fa1a0416_e5e9c301\slowloadwebapp.dll', Symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\slowloadwebapp\f7c3f075\b19a58a7\tcmapekp.dll', Symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\slowloadwebapp\f7c3f075\b19a58a7\kbhl-mnz.dll', Symbols loaded.

I believe this to be a server side issue because I've tried with various other remote client machines and I get the same results.

Any help to resolve this would be appreciated.

Thanks,

John Alesse
Zaptose Technologies
 
Ad

Advertisements

B

bruce barker

your timing's seems about right, actually kinda quick. for IE to host a
WinForm control, it has to load the .net runtime, create an appdomain to
host the control, download the code, jit and load it. Your 40 seconds also
seems right for a control of any complexity. You can proably get the 40
seconds back down to about 12 seconds by preinstalling it in the GAC.

If you want to use controls with IE, you should really should stick with
true active/x controls.

-- bruce (sqlwork.com)



John Alesse said:
Hi, I've created a very simple winforms control using the c# wizard in VS
..net 2003 that is nothing but a System.Windows.Forms.UserControl. There are
no other controls on the form.
It takes IE 12 seconds to load this control into the page. CPU usage is at
only 1% to 2% during the 12 secs
All of this is on a single machine:

XP Pro sp1 (all critical updates loaded)
2.6GHz, P4, 512MB ram
IE v6.0.2800.1106.xpsp2.030422-1633
IIS 5.1
.net framework 1.1.4322.573 (my computer, intranet security set to "Full Trust")

Here is the html page I use to load it:

<html><body><object id="SlowLoad1"
classid="http:SlowLoad1.dll#SlowLoad1.UserControl1" height="500" width="500"
VIEWASTEXT> said:
The real control I'm trying to build takes over 40 seconds to load. I'm
finding that it hangs when calling ResourceManager functions that load an
imagelist, but finally it does load, and work once loaded.
Worth noting that before running the test:

- I cleared out everything under my user account\VSWebCache
- Removed everything under
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files
- killed (auto restarted) aspnet_wp.exe


Here is a dump of the gac and dll loading when launching the web app from VS .net:

Auto-attach to process '[2396] aspnet_wp.exe' on machine 'JJAHOME' succeeded.
'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.
dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No
symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50
a3a\system.enterpriseservices.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50
a3a\system.enterpriseservices.thunk.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.dat
a.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.
drawing.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.
dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f1
1d50a3a\system.web.regularexpressions.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.
dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No
symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50
a3a\system.enterpriseservices.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50
a3a\system.enterpriseservices.thunk.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.dat
a.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.
drawing.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.
dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f1
1d50a3a\system.web.regularexpressions.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\sy
stem.web.services.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\slowloadwebapp\f7c3f075\b19a58a7\assembly\dl2\2a9d5b70\fa1a0416_e5e9c3
01\slowloadwebapp.dll', Symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\syst
em.web.mobile.dll', No symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\slowloadwebapp\f7c3f075\b19a58a7\tcmapekp.dll', Symbols loaded.
'/LM/w3svc/1/root/SlowLoadWebApp-2-127202564634218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\slowloadwebapp\f7c3f075\b19a58a7\kbhl-mnz.dll', Symbols loaded.
I believe this to be a server side issue because I've tried with various
other remote client machines and I get the same results.
 
Ad

Advertisements

J

john Alesse

Bruce,

Thanks for the reply. The thing is, when I build our real control into a
local winforms App and launch it, 40 seconds becomes 2. My guess is that
IE must be doing lot's of security stuff before allowing the control to
run.

I think I'm going to explore a Smart Client based solution instead of
going back to Active-X

-J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top