I have a dot net web application. There is one page where we enter data & submit the form.We upload the attachment before submitting the form.The submit action is taking long time almost minute for files with attachment of 650KB. The code behind is C#. We use third party API(Ektron).Its a CMS tool.
Please let me know , in what all ways i can analyse the bottle neck for the issue.Please provide open source Tool & the browser addons.. other than Page speed & Yslow .
Please check if the time taken is for the request to initiate or the response to comeback to your browser..
It is only then you can look for a solution..
To answer the second half of your question. At the very least most modern browsers (FireFox, Chrome and Safari) have a developer console that will give you a breakdown of the times taken in each request state on a per request basis. My personal preference is FireFox with FireBug as I find the Network pane view easy to interpret.
Redgate ANTS Performance Profiler is pretty much the bees knees for troubleshooting performance problems in ASP.net.
Related
I have a site that has a several page offer form. The offer information is stored in a session, and I keep track of what step the customer has completed. If the customer has not completed all previous steps in relation to the page they are on then they are redirected back to the start of the process. In this way I prohibit users from accessing step 3 by simply typing in it's URL. This is done because information on steps after 1 depend on valid information from previous steps.
The problem is that when I set up my content experiment through Google Analytics it cannot validate my original or variation pages since when it hits those pages (which is step 4) the sever recognizes that they are not allowed on that page and returns step 1 to them.
I attempted to proceed anyways, but it seems that when I arrive at step 4 it is not pushing me to my variation page (I have it set so that everyone that arrives at step 4 should go to the variation.) I'm assuming the problem is because of the redirect.
Any ideas?
The perceived problem was that GA could not ping my page because of the redirect I have on it.
The actual problem was that my GA experiments code was not the very first thing after my opening HEAD tag. GA Experiments only scan the first 256 characters of a page, so if the beginning of the experiments code is not within that, then it won't work.
Also, I had my GA code in a js file and was linking it on the page for cleanliness....this also does not work. GA Experiments scans the first 256 characters of the page and cares not for links, I needed to have the exact code, with comments, that GA gave me on the page for this to work.
my scenario is this; the user selects the list of reports they wish to print, once they select and click on the a button, i open up another page with the selected reports ready for printing. I am using a session variable to pass reports from one page to another.
first time you try it, it works fine, second time you try it, it opens the report window with the previous selected reports. I have to refresh the page to make sure it loads the latest selections.
is there a way to get the latest value from the session every time you use it? or is there a better way to solve this problem. open for suggestions...
Thanks
C# Asp.net, IE&7 /IE 8
After doing some more checking maybe if you check out COMET it might help.
The idea is that you can have code in your second page which will keep checking the server for updated values every few seconds and if it finds updated values it will refresh itself.
There are 2 very good links explaining the imlementation.
Scalable COMET Combined with ASP.NET
Scalable COMET Combined with ASP.NET - Part 2
The first link explains what COMET is and how it ties in with ASP.NET, the second link has an example using a chat room. However, I'm sure the code querying for updates will be pretty generic and can be applied to your scenario.
I have never implemented COMET yet so I'm not sure how complex it is or if it is easy to implement into your solution.
Maybe someone developing the SO application is able to resolve this issue for you. SO uses some real-time feature for the notifications on a page, i.e: You are in the middle of writing an answer and a message pops up in your client letting you know someone else has added an answer and to click "here" to refresh.
The proper fix is to set the caching directives on the HTTP response correctly, so that the cached response is not reused without validation from the server.
When you fail to specify the cache lifetime, the client has to "guess" how long the response is good for, and the browser's guess probably isn't what you want. See http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx
It's better to use URL paramaters. So you have a view of value of the paramaters.
I'm running this out of the VS 2008 debugger on Windows 7, running .Net 3.5.
The idea was to make all ajax requests with jQuery only, rather than .net, following some tutorials online.
Default.aspx -> HTML page, jquery triggers method in Default.aspx.cs
http://pastebin.com/pxBvKA2H
Default.aspx.cs -> C# Webform, just defines a GetDate function, which only returns a string for now (trying to eliminate any possible issues)
(can only post one hyperlink...) pastebin.com/pnHn50hu
The ajax query takes longer than it should. Profiling with firebug revealed that it took 1.03 ms.
1s DNS Lookup |
26ms Waiting |
1ms Receiving
EDIT: It continues to take the same set of times if you continue to click and resubmit the request.
Is there anything I can do to cut down on the DNS Lookup time / what did I do wrong?
Is it only slow in Firefox? This sounds like the old IPv6 lookup problem that Firefox tends to suffer from.
If it's fast in IE, then follow these directions to turn off IPv6 lookups in firefox.
After you get site running in debug mode, change your URL in the browser from localhost:#### to 127.0.0.1:#### and see if that makes a difference. I found recently that it did.
Short story:
My site pre generates pages based on user submited data, sometimes this cache has to be cleared when this happens it would kill a super computer unless i controled the amount of stats being generated at once.
The problem:
Now comes the search engine bots that hit the site constantly ( due to the sheer amount of pages, its pretty constants that search engines bot crawl ). The problem here is that they will use up all my "generate" slots, and real users will be left with a page saying "bla bla, please wait".
Posible solution:
Can i basicly return a 503 to the bots, without having them give me negative ranking for having a unstable site?
Or did someone come up with some other solution?
How critical is it that the cache is cleared immediately? If your cache supports it, you could instead mark all the cached pages as 'dirty' and regenerate them when a real user next visits; if a bot visits in the meantime, serve them the stale page.
Is there something akin to the 'Django Debug Toolbar' for ASP.NET (and more specifically ASP.NET MVC).
It's an HTML page overlay that shows total execution time, SQL queries (and time), what views were called... etc.
I'm a bit late with the answer. The mini profiler does just that. You can see it in action at http://data.stackexchange.com (top left corner).
I use a HttpModule like this one to log request performance information.
Glimpse:
The Diagnostics platform of the web
Providing real time diagnostics & insights to the fingertips of hundreds of thousands of developers daily
Live demo: http://play.getglimpse.com/
Glimpse Heads-Up Display (HUD) is a mini dashboard that pulls out the most important details about a request and displays it at the bottom of your page.
From the HUD, you can dive down into another level of information by clicking on the "G" in the lower right corner. When the Main Panel opens you will be presented with a series of tabs which offer a range of insights into your application.
Core tabs:
Ajax
History
Timeline
Trace
ASP.NET tabs:
Cache
Configuration
Environment
Request
Routes
Server
Session
ASP.NET MVC specific tabs:
Execution
Model Binding
Metadata
Views
EF tabs:
SQL
If you are using EF, NH or L2S you can check awesome http://hibernatingrhinos.com/products/UberProf . It'll help you with sql queries and will warn you about some bad practices (select N+1, etc.).
ELMAH may be useful for you too.
And to measure time on server side try checking the time between OnResultExecuting/OnResultExecuted. This is basically the time to actually render the page in HTML.
On client side you can use Firebug extension to Firefox, check Network tab
No, nothing I'm aware of.
If you're using WebForms as your views you can get the name of the rendered view from standard ASP.NET trace (set , then navigate to {approot}/trace.axd). And if you're using SQL Server as your DBMS use Profiler to see queries.