Last post Oct 05, 2016 11:03 AM by markfitzme
Oct 03, 2016 06:19 AM|issam1975|LINK
my web application is really fast on my dev machine but very very slow on production server .
so after some search i have enabled the trace in the page level to see what's going on
my page load in about 16 sec !
a little below
obviousely what take most time is two system.web.ui.literalcontrol controls : ctl17 and ctl20
but i don't have any idea on where these two come from
what kind of asp.net server controls can generate system.web.ui.literalcontrol at execution ?
any idea/tip/help is welcome
Oct 04, 2016 09:27 AM|Yohann Lu|LINK
As far as I know, An HTML element that does not contain a runat="server" attribute/value pair in its opening tag is compiled into a LiteralControl object.
LiteralControl objects do not maintain view state, so the contents of a LiteralControl object must be recreated on each request.
Therefore, when you develop a custom control derived from the LiteralControl class, make sure your control performs any required preprocessing steps itself, rather than using a call to the LiteralControl.Render method to accomplish them. In this way, you
can improve the response time of your Web application.
You can refer the following link.
Oct 05, 2016 11:03 AM|markfitzme|LINK
Lots of controls could use literals as placeholders, with other controls rendered within them since it's essentially a placeholder to put rendered content or text (or html).What you're showing here has no indication of slowness as all this demonstrates is
a small amount of HTML being rendered, and a small amount of ViewState. These should take way less than a second to go across the network and render. You need to focus on the execution times provided to truly get an idea of what is slow. The top portion of
the trace will be important in this case.
Since this shows a repeater, look at the databound function of the repeater for things like excessive loops. Look at the amount of data and the query that is initially populating the repeater as it could be slower on another environment especially if the
data is file-based.
Additionally, use the F12 developer tools in your browser and turn on a network trace to identify render times. It could simply be that there is a resource that the page calls that takes a long time to load, not the page itself and the F12 tools could demonstrate
Also, ensure that the slowness occurs every time and that you aren't looking at slowness from the application waking up. It's slow the very first time due to a compilation phase, and that generally occurs whenever the application is recycled or torn down
due to inactivity.