473,411 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Finding Bottlenecks

Hi there,

I have a website that functions fine locally, but when published to the
server it develops a bottleneck during loading some of the pages. Basically
what happens is the page loads to about 25% then it freezes for anything
from 10 - 40 seconds, before suddenly loading the rest of the page.

Of course I understand that this could be down to some code on the page
locking the thread or suchlike, but I would like to be able to be able to
find exactly where the bottle neck is occuring. Strangely enough this
doesn't seem to occur in Firefox although Firefox displays quicker it seems
to do whatever is holding IE up in the background so you get the illusion of
it loading quicker.

Any suggestions on tools or methods for finding bottlenecks in page
loading? Many thanks in advance for your time and help.

Nick.
Jul 22 '08 #1
7 2729
Tracing works, if you want something easy to turn on and a bit down and
dirty. You can also code a trace listener if you want to log these things.

There are also tools that you can profile your code with, although most of
them cost at least something. If you have a Team System SKU, there is a
profile included. Not quite what some of the Enterprise tools out there
offer, but a good start. DotTrace, from JetBrains, is a nice personal
profiler (at $199 for personal, not bad pricing either).

I will have to find the link, but I saw a neat free profiler for the Compact
Framework, which I think will work with non CE programs. Note to self: have
to find the link. :-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
"Nick" <a@a.comwrote in message
news:O2**************@TK2MSFTNGP04.phx.gbl...
Hi there,

I have a website that functions fine locally, but when published to the
server it develops a bottleneck during loading some of the pages.
Basically what happens is the page loads to about 25% then it freezes for
anything from 10 - 40 seconds, before suddenly loading the rest of the
page.

Of course I understand that this could be down to some code on the page
locking the thread or suchlike, but I would like to be able to be able to
find exactly where the bottle neck is occuring. Strangely enough this
doesn't seem to occur in Firefox although Firefox displays quicker it
seems to do whatever is holding IE up in the background so you get the
illusion of it loading quicker.

Any suggestions on tools or methods for finding bottlenecks in page
loading? Many thanks in advance for your time and help.

Nick.
Jul 22 '08 #2
Hi Nick,

Regarding on such issue, for locating the bottle neck, it is quite common
to do some tracing or profiling work upon your web application. for tracing
, the ASP.NET has already provided trace functionality:

#ASP.NET Trace
http://msdn.microsoft.com/en-us/libr...we(VS.71).aspx

#Tracing in ASP.NET 2.0
http://www.beansoftware.com/ASP.NET-...g-ASP.NET.aspx

You can add trace print statement in those page events/functions where you
put code logic(may block the page) so that in the trace output, you can
view the time point those event arrive and the next one starts.

Also, visual studio has provided good profiling tools that can help track
the performance issues:

#Analyzing Application Performance using Profiling Tools
http://msdn.microsoft.com/en-us/library/z9z62c29.aspx

#How to: Create Performance Session for ASP.NET Applications
http://msdn.microsoft.com/en-us/libr...1d(VS.80).aspx

the profiling report can give you some info such as what are the most used
functions, or the most long run functions...

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: "Nick" <a@a.com>
Subject: Finding Bottlenecks
Date: Tue, 22 Jul 2008 18:44:40 +0100
>
Hi there,

I have a website that functions fine locally, but when published to
the
>server it develops a bottleneck during loading some of the pages.
Basically
>what happens is the page loads to about 25% then it freezes for anything
from 10 - 40 seconds, before suddenly loading the rest of the page.

Of course I understand that this could be down to some code on the
page
>locking the thread or suchlike, but I would like to be able to be able to
find exactly where the bottle neck is occuring. Strangely enough this
doesn't seem to occur in Firefox although Firefox displays quicker it
seems
>to do whatever is holding IE up in the background so you get the illusion
of
>it loading quicker.

Any suggestions on tools or methods for finding bottlenecks in page
loading? Many thanks in advance for your time and help.

Nick.
Jul 23 '08 #3
Hi Gregory,

Thanks a million for the information I think I'll give tracing a go and
see if that shows anything before having a look at the profiling systems.

Cheers for your time.

Nick.

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:eH**************@TK2MSFTNGP06.phx.gbl...
Tracing works, if you want something easy to turn on and a bit down and
dirty. You can also code a trace listener if you want to log these things.

There are also tools that you can profile your code with, although most of
them cost at least something. If you have a Team System SKU, there is a
profile included. Not quite what some of the Enterprise tools out there
offer, but a good start. DotTrace, from JetBrains, is a nice personal
profiler (at $199 for personal, not bad pricing either).

I will have to find the link, but I saw a neat free profiler for the
Compact Framework, which I think will work with non CE programs. Note to
self: have to find the link. :-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
"Nick" <a@a.comwrote in message
news:O2**************@TK2MSFTNGP04.phx.gbl...
>Hi there,

I have a website that functions fine locally, but when published to
the server it develops a bottleneck during loading some of the pages.
Basically what happens is the page loads to about 25% then it freezes for
anything from 10 - 40 seconds, before suddenly loading the rest of the
page.

Of course I understand that this could be down to some code on the
page locking the thread or suchlike, but I would like to be able to be
able to find exactly where the bottle neck is occuring. Strangely enough
this doesn't seem to occur in Firefox although Firefox displays quicker
it seems to do whatever is holding IE up in the background so you get the
illusion of it loading quicker.

Any suggestions on tools or methods for finding bottlenecks in page
loading? Many thanks in advance for your time and help.

Nick.

Jul 23 '08 #4
Hi Steven,

Thanks for your help and links to articles, they are most helpful.

Unfortunately I enabled tracing and when I finally got it to work during
the bottleneck it didn't show the results I was expecting. It said that end
render fired 0.96 seconds after the first event, that's far from the truth
as it took roughly 15 seconds for all images to appear and for the progress
bar to complete.

I guess that means that I'm going to have to look at profiling as per
Gregs suggestion.

Thanks for your time in the matter.

Nick.

"Steven Cheng [MSFT]" <st*****@online.microsoft.comwrote in message
news:uI**************@TK2MSFTNGHUB02.phx.gbl...
Hi Nick,

Regarding on such issue, for locating the bottle neck, it is quite common
to do some tracing or profiling work upon your web application. for
tracing
, the ASP.NET has already provided trace functionality:

#ASP.NET Trace
http://msdn.microsoft.com/en-us/libr...we(VS.71).aspx

#Tracing in ASP.NET 2.0
http://www.beansoftware.com/ASP.NET-...g-ASP.NET.aspx

You can add trace print statement in those page events/functions where you
put code logic(may block the page) so that in the trace output, you can
view the time point those event arrive and the next one starts.

Also, visual studio has provided good profiling tools that can help track
the performance issues:

#Analyzing Application Performance using Profiling Tools
http://msdn.microsoft.com/en-us/library/z9z62c29.aspx

#How to: Create Performance Session for ASP.NET Applications
http://msdn.microsoft.com/en-us/libr...1d(VS.80).aspx

the profiling report can give you some info such as what are the most used
functions, or the most long run functions...

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
>>From: "Nick" <a@a.com>
Subject: Finding Bottlenecks
Date: Tue, 22 Jul 2008 18:44:40 +0100
>>
Hi there,

I have a website that functions fine locally, but when published to
the
>>server it develops a bottleneck during loading some of the pages.
Basically
>>what happens is the page loads to about 25% then it freezes for anything
from 10 - 40 seconds, before suddenly loading the rest of the page.

Of course I understand that this could be down to some code on the
page
>>locking the thread or suchlike, but I would like to be able to be able to
find exactly where the bottle neck is occuring. Strangely enough this
doesn't seem to occur in Firefox although Firefox displays quicker it
seems
>>to do whatever is holding IE up in the background so you get the illusion
of
>>it loading quicker.

Any suggestions on tools or methods for finding bottlenecks in page
loading? Many thanks in advance for your time and help.

Nick.

Jul 23 '08 #5
It could be just that this is a client side issue (I thought about that also
when seeing that you said it was quicker with FF).

Of course with ASP.NET trace enabled you are just seeing server side
processing. My guess would be that you could have a quite complex nested
structure for your page that takes a fair amount of time to layout in IE...

--
Patrice

"Nick" <a@a.coma écrit dans le message de groupe de discussion :
uj**************@TK2MSFTNGP06.phx.gbl...
Hi Steven,

Thanks for your help and links to articles, they are most helpful.

Unfortunately I enabled tracing and when I finally got it to work
during the bottleneck it didn't show the results I was expecting. It said
that end render fired 0.96 seconds after the first event, that's far from
the truth as it took roughly 15 seconds for all images to appear and for
the progress bar to complete.

I guess that means that I'm going to have to look at profiling as per
Gregs suggestion.

Thanks for your time in the matter.

Nick.

[cut]>

Jul 23 '08 #6
Hi Patrice,

I think you are right, I have run profiling on the effected part and cut
down as much loading time as I possible could which has shaved a couple of
seconds off the loading time, but the delay is still there.

I'm not quite sure if it would be classed as a complex section though
tbh, I mean it's styled DIV with an unordered list UL inside which get
styled into buttons through the containing DIVs style. So pretty basic
really, but what currently happens is it gets to like the 2nd or 3rd button
then pauses for x seconds before resuming with page rendering.

Although with that said, one of the items does contain a few variables,
i.e. <%$AppSettings:blabla %>, so I'm not sure if that could be slowing
things down as it's on the 4th button. I'll see what changing it does...

Thanks for your time and feedback, I'll get to the bottom of this
eventually.

Nick.

"Patrice" <http://www.chez.com/scribe/wrote in message
news:5B**********************************@microsof t.com...
It could be just that this is a client side issue (I thought about that
also when seeing that you said it was quicker with FF).

Of course with ASP.NET trace enabled you are just seeing server side
processing. My guess would be that you could have a quite complex nested
structure for your page that takes a fair amount of time to layout in
IE...

--
Patrice

"Nick" <a@a.coma écrit dans le message de groupe de discussion :
uj**************@TK2MSFTNGP06.phx.gbl...
>Hi Steven,

Thanks for your help and links to articles, they are most helpful.

Unfortunately I enabled tracing and when I finally got it to work
during the bottleneck it didn't show the results I was expecting. It
said that end render fired 0.96 seconds after the first event, that's far
from the truth as it took roughly 15 seconds for all images to appear and
for the progress bar to complete.

I guess that means that I'm going to have to look at profiling as per
Gregs suggestion.

Thanks for your time in the matter.

Nick.

[cut]>


Jul 23 '08 #7
Thanks for the reply Nick,

yes, as you've profiled, the server-side processing takes much less time
than what you actually seen(from the first event to the page display at
client). Then, the problem is likely occuring during the output
rendering/transfering from server to the client browser. Generally, you
can first check page size to make sure it is reasonable and not too
large(such as contains large viewstate). Then, we need to take further look
into the behavior, maybe some network trace will be also necessary.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Nick" <a@a.com>
References: <O2**************@TK2MSFTNGP04.phx.gbl>
<uI**************@TK2MSFTNGHUB02.phx.gbl>
<uj**************@TK2MSFTNGP06.phx.gbl>
<5B**********************************@microsoft.co m>
>Subject: Re: Finding Bottlenecks
Date: Wed, 23 Jul 2008 14:07:06 +0100
>
Hi Patrice,

I think you are right, I have run profiling on the effected part and
cut
>down as much loading time as I possible could which has shaved a couple of
seconds off the loading time, but the delay is still there.

I'm not quite sure if it would be classed as a complex section though
tbh, I mean it's styled DIV with an unordered list UL inside which get
styled into buttons through the containing DIVs style. So pretty basic
really, but what currently happens is it gets to like the 2nd or 3rd
button
>then pauses for x seconds before resuming with page rendering.

Although with that said, one of the items does contain a few
variables,
>i.e. <%$AppSettings:blabla %>, so I'm not sure if that could be slowing
things down as it's on the 4th button. I'll see what changing it does...

Thanks for your time and feedback, I'll get to the bottom of this
eventually.

Nick.

"Patrice" <http://www.chez.com/scribe/wrote in message
news:5B**********************************@microso ft.com...
>It could be just that this is a client side issue (I thought about that
also when seeing that you said it was quicker with FF).

Of course with ASP.NET trace enabled you are just seeing server side
processing. My guess would be that you could have a quite complex nested
structure for your page that takes a fair amount of time to layout in
IE...

--
Patrice

"Nick" <a@a.coma écrit dans le message de groupe de discussion :
uj**************@TK2MSFTNGP06.phx.gbl...
>>Hi Steven,

Thanks for your help and links to articles, they are most helpful.

Unfortunately I enabled tracing and when I finally got it to work
during the bottleneck it didn't show the results I was expecting. It
said that end render fired 0.96 seconds after the first event, that's
far
>>from the truth as it took roughly 15 seconds for all images to appear
and
>>for the progress bar to complete.

I guess that means that I'm going to have to look at profiling as
per
>>Gregs suggestion.

Thanks for your time in the matter.

Nick.

[cut]>



Jul 24 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tristan | last post by:
Im trying to expand a search util by uing regular expression to allow common search criteria such as +-* and phrases "". My understanding of ereg(string pattern, string string, ) is that the...
11
by: Fuzzyman | last post by:
What's the best, cross platform, way of finding out the directory a script is run from ? I've googled a bit, but can't get a clear answer. On sys.argv the docs say : argv is the script name...
1
by: Phil Watkins | last post by:
I am a novice programer in Vb and I am having a major brain ache finding out which item has been selected within a list view and then either deleting that item or editing them. My searching so...
5
by: Robert Manea | last post by:
Hello everyone, I wrote, simply as an exercise, a small piece of code to find 'strings' (defined as an amount of at least 3 ASCII characters followed by a non ASCII character) in binary files. ...
1
by: Jeff | last post by:
Okay, I know there is likely no straght-forward way to get a definitive answer to the question, "why is my page loading so slowly tonight?"; but I'm thinking that there *are* some things we can...
5
by: Alex | last post by:
hi there, in my program (made with Visual C++) is one subroutine that slows down the entire programm quite a bit. I would like to know, which part of this subroutine is causing this and why. Does...
2
by: ElkGroveR | last post by:
Hi there! I'm using PHP to create a simple, dynamic MySQL SELECT query. The user chooses a selection from a HTML Form SELECT element's many options and submits the form via a POST action. ...
0
by: NSF12345 | last post by:
Iv developed a small program that looks for a file over our network, and copy it to the location of another computer. Im using the "If FileExists("\\oldpc\main share\Folder\file.txt") Then" way of...
4
by: krishnai888 | last post by:
I had already asked this question long back but no one has replied to me..I hope someone replies to me because its very important for me as I am doing my internship. I am currently writing a code...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.