Our project uses several UserControls that are used on different pages.
We load these UserControls dynamically in the page whenever they are needed.
This all works great, and fast, in our development environment.
But when we run it on the production server it takes ages.
We narrowed down the "slowdown" to the following lines of code:
|Trace.Write("RegiStar", "Start toevoegen mat_Ereigniseingabe");
| string userControlName = "Mat_Tab_DetailInventar.ascx";
| Control userControl = Page.LoadControl(userControlName);
| userControl.ID = e.PageView.ID + "_userControl";
|Trace.Write("RegiStar", "einde toevoegen mat_Ereigniseingabe");
This part of code takes .09 seconds on our development machine but takes almost 17 seconds on our production server.
What could make this run so slow?
When we trace the PageLoad in "mat_tab_detailinventar.ascx" we see that there is no delay there. It runs almost as fast as on our development server.
For your information.
Our development machines are all English wit XP. The production server is a German Win2003 SBS server.
Does anybody have an idea?