473,756 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2759
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******** ******@TK2MSFTN GP04.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****@microsof t.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.netNoS pamMwrote in
message news:eH******** ******@TK2MSFTN GP06.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******** ******@TK2MSFTN GP04.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.comw rote in message
news:uI******** ******@TK2MSFTN GHUB02.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****@microsof t.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******** *************** ***********@mic rosoft.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****@microsof t.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************ **@TK2MSFTNGHUB 02.phx.gbl>
<uj************ **@TK2MSFTNGP06 .phx.gbl>
<5B************ *************** *******@microso ft.com>
>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******* *************** ************@mi crosoft.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
2078
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 array register should collect all instances that match the pattern. Heres is an example of the code: $word4 = "+budgie +ferret dog."; //set phrase
11
2388
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 (it is operating system dependent whether this is a full pathname or not). So this doesn't seem to be the answer.
1
6515
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 far seems to indicate the use of the "contains" command but I cannot find a helpfull reference. Any help greatly apreciated as I am workin on the second bottle of nurophen
5
5847
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. The purpose of the program is to serve as a facile 'strings' (Unix command) replacement and to be 100% ANSI C. Unfortunatelly it operates notedly slower than the original 'strings' from the fileutils package.
1
1494
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 measure to get *some* general idea of where the bottleneck is. I can sit here and theorize about why it's periodically slow, but I'd like to be able to know what's causing the periodical performance degradation. My situation is that I have an...
5
1872
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 anybody know some command or a tool in Visual C++ to detect slow parts? any help is appreciated alex
2
2851
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. The SELECT query is built as follows: $itemtype = stripslashes(trim($_POST));
0
1898
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 finding if the file exists, but i want to make it so that it tries to look for the computer, not the file. At the moment this is how i am finding and copying the file: If FileExists("\\oldpc\main share\Folder\file.txt") Then FileCopy "\\oldpc\main...
4
8095
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 involving lot of matrices. At one point I need to calculate the square root of a matrix e.g. A which contains non-zero off-diagonal elements. I searched for a lot of info on net but no algorithm worked. My best bet for finding square root was to find...
0
9455
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9271
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10031
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9838
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7242
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2665
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.