Performance - Webforms W/ AJAX Slow Rendering?
Mar 1, 2010
I have a Webforms, AJAX-enabled web page which, when rendering large amounts of data, is extremely slow to load in IE (we're married to IE - no other browser options). In an attempt to determine the source of the slowness, I viewed the HTML source (about 2.5 MB) and copied all of it (except for the Ajax JavaScript calls) to a blank .html file. IE renders this file MUCH faster than when the rendering happens through .Net. This seems to indicate that the AJAX JavaScript is slowing down the display of the page. Does this sound plausible? Any recommendations on improving performance here?
I've already eliminated as many UpdatePanel controls as I can from the page, but it doesn't seem to help with render time.Update... In the HTML source, I noticed that at the bottom of the screen, a call to WebForm_InitCallback() appears. When I executed this call directly through javascript:alert(WebForm_InitCallback());, the CPU spikes for 12 seconds before it completes! This call is here because I implemented ICallbackEventHandler to try to accomplish some traditional-style AJAX handling. Looking at WebResource.axd, that WebForm_InitCallback() method iterates through the entire form and attaches some kind of events to EVERY SINGLE textbox, checkbox, radiobutton, etc. So I guess I really need to abandon ScriptManager and UpdatePanel altogether here.
View 1 Replies
Similar Messages:
Mar 2, 2010
Whenever I use ASP.NET AJAX it's calling Resource.asx files many times and it's affecting site performance. How can we avoid that?
View 3 Replies
Nov 19, 2010
I have a strange situation on a production server. Connection for asp.net get queued but the CPU is only at 40%. Also the database runs fine at 30% CPU.
Some more history as requested in the comments:
In the peak hours the sites gets around 20,000 visitors an hour.
The site is an asp.net webforms application with a lot of AJAX/POSTs
The site uses a lot of User generated content
We measure the performance of the site with a testpage which does hit the database and the webservices used by the site. This page get served within a second on normal load. Whe define the application as slow when the request takes more than 4 seconds.
From the measurements we can see that the connectiontime is fast, but the processing time is large.
We can't pinpoint the slowresponse the a single request, the site runs fine during normal hours but gets slow during peak hours
We had a problem that the site was CPU bound (aka running at 100%), we fixed that
We also had problems with exceptions maken the appdomain restart, we fixed that do
During peak hours I take a look at the asp.net performance counters. We can see behaviour that we have 600 current connections with 500 queued connections.
At peak times the CPU is around 40% (which makes me the think that it is not CPU bound)
Physical memory is around 60% used
At peak times the DatabaseServer CPU is around 30% (which makes me think it is not Database bound)
My conclusion is that something else is stopping the server from handling the requests faster. Possible suspects:
Deadlocks (!syncblk only gives one lock)
Disk I/O (checked via sysinternals procesexplorer: 3.5 mB/s)
Garbage collection (10~15% during peaks)
Network I/O (connect time still low)
To find out what the proces is doing I created to minidumps.
I managed to create two MemoryDumps 20 seconds apart. This is the output of the first:
!threadpool
CPU utilization 6%
Worker Thread: Total: 95 Running: 72 Idle: 23 MaxLimit: 200 MinLimit: 100
Work Request in Queue: 1
Number of Timers: 64
and the output of the second:
!threadpool
CPU utilization 9%
Worker Thread: Total: 111 Running: 111 Idle: 0 MaxLimit: 200 MinLimit: 100
Work Request in Queue: 1589
View 3 Replies
Nov 22, 2010
I'm using MySql with asp.net 2.0. Every page witch has a database operation take long time to complete. How can i increase the performance.
View 1 Replies
Feb 22, 2011
There's a web app I've been assigned to, which is running very slow. It is a site that sells products so it is database driven, however even pages that do not query the database are loading very slow. The pages use master pages, and the code is in VB.NETI checked with fiddler and the time it takes to load basic (non database driven) pages are about 5.5 seconds on average.
What are some tools that can help me determine the cause of the slow speeds, and any recommendations as to how to speed it up, or potential issues that could cause it?UpdateSo I messed around with the code piece by piece as I wasn't getting anywhere with these tools. As soon as I remove master pages, and I include the same code that's on the master pages in the .aspx page itself, the speed improves drastically (approximately 5 times faster load times).What might cause the master pages to cause load times to slow down so much?
View 4 Replies
Jan 20, 2010
Every now and then (always after a long period of idle-time, e.g. overnight) when I access a site built using asp.net - it takes around 15 seconds to load the page (15 seconds before I see any progress whatsoever, then the page comes up fast).Further pages on that site, or refreshes, are quick as usual - they are also fast on other machines, only the first one seems to take the 'hit'.
Page tracing never through anything up (whole cycle was a fraction of a second) So my question is where else should I be looking? Perhaps IIS? Or could it still be my asp.net app and I'm just looking in the wrong place (the trace) for clues?As I don't have much control over the IIS server, anything I can check through asp.net would be more helpful, before I go ask that particular admin.
View 7 Replies
Feb 16, 2011
I have developed a gridview which has 7,000 records with some filtering. However, theuser is compaining that it is too slow. It seems to me that if the records were stored in memory it would be much faster. This is caching, I think. Is that the case? Can you updaterecords this way? Can you cache with an Access database or do you have to use SQL Server? Can you think of any other ways to improve
View 11 Replies
Mar 14, 2010
How would you troubleshoot a page that is rendering slowly in ASP.NET?
This issue is happening on only specific pages with a few user controls. Other pages work fine. Tracing has clarified that the issue is happening between "Begin Render" and "End Render".
View 3 Replies
Jan 19, 2010
I often Observed that pages developed in simple asp is being load most speedy then pages developed in asp.net ,
View 5 Replies
Jan 20, 2011
I am using gridview. In which i m entering some value in textbox in Gridview.According to that value, i m generating datatable and binding it to the Gridview(Child Gridview).But when i m doing this, the performance of the page is very slow. How do i improve the performance.
View 3 Replies
Sep 7, 2010
I just had to moved a site of mine from a hosting service here in the states to an offshore host located in Malaysia. My database is still located on the east coast of north america and I am wondering if the distance between the database and the file system might be to blame for slow load times or if moving my database as well would be a waste of time.
View 2 Replies
Sep 20, 2010
I have developed a website in asp.net framework 2 . This website is being hosted in two different servers without any change in code. My issue is about the performance of these 2 sites. One website is taking much time for inserting datas to the DB (SQL server 2005). 2 websites are having different DB server.
I think the issue is for the DB server. How can we rectify the DB performance while insertion and Is there any other cause for this permance issue?
View 1 Replies
Apr 29, 2010
I am not sure if this is the right forum. I can not find a forum for LINQ.
I am working on an application using LINQ. Application performance is not up to par and my tests show that it is LINQ queries that are slow. I was wondering if anybody can recommend where I can find an article about optimizing LINQ performance maybe by compilation or other methods.
View 1 Replies
Mar 20, 2011
I am creating a service oriented application where trying to have everything using services....however there is something I am not sure of , I am having a page that calls the database at the page load...so what would be better and faster?? to call database in pageload , or to call wcf service from javascript during javascript load ??btw , I am using a repeater in the page , but I have created somekind of an engine to create the suitable html so...I'll be creating the repeaters html using the wcf and resend it back to the page If I am using a wcf service at the start.
View 1 Replies
Aug 19, 2010
website slow on first click on home page i have not used ajax except calender control and webgroupbox from infragistics.So i plan to place all my postback button on home page in update panel. So that whole page does not make a post backAnd my application is fast on first click.
View 11 Replies
Nov 15, 2010
My basic structure is that I have a table on a page, which I want to reload without refreshing the entire page. So on clicking a button on the page it fires of this:
function RefreshMissionsAjax() {
//fade out the old table.
$(clientID('MissionsDisplay')).fadeOut(500);
//request the new value from the page (calls the GetIncompleteMissions() method in the MissionViewer.aspx.cs page)
$.ajax({
type: "POST",
url: "MissionViewer.aspx/GetIncompleteMissions",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
$(clientID('MissionsDisplay')).html(msg.d);
$(clientID('MissionsDisplay')).fadeIn(500);
},
error: function (xhr, ajaxOptions, thrownError) {
$(clientID('MissionsDisplay')).html('An error occured while trying to refresh the page data.');
$(clientID('MissionsDisplay')).fadeIn(500);
}
});
}
And I have in the code bedind of an aspx page:
[WebMethod]
public static string GetIncompleteMissions()
{
return GetHTMLTable();
}
This method just grabs some data, and creates a html table - nothing too fancy. When the returned table is small (a dozen rows or less) then it works like a charm. But when it gets larger, it takes a long long time. At 100 rows it can take 5 minutes to render the table. At 1000 rows I have left it for 30 minutes and nothing will happen after the fadeout. (NB - it loads fairly quickly on the pageload, before the ajax refresh is used, so it is not the actual server side creation of the table thats the problem).
This is my first real attempt at doing something like this, so I dont know if this is the best way to do it - it was just something i pieced together that worked great when i was testing with small datasets. Now, not so much.
View 1 Replies
Apr 21, 2010
I have an application that runs perfectly fine and fast in IE 7. There are certain pages in the application that use the AlwaysVisibleExtender control.
However, when I run the app in IE 8, the same exact pages seem to lock up for roughly 5 seconds before they render completely. What's weird is that the page shows all the contents except for the alwaysvisibleextender and relating panel. Then after the 5 seconds the panel shows. During that 5 seconds the page cannot be navigated or scrolled. This is not really acceptable.
View 3 Replies
Aug 11, 2010
I have, what i think is a very simple updatepanel setup. I have searched and found other similar issues, but they date back to 2008 and 2009. Is the fix provided back then the only known fix now? Is there any other fixes or things.
[URL]
And here is my aspx code:
[Code]....
View 2 Replies
Feb 18, 2010
So i'm new to AJAX and just installed the AJAX toolkit.
When i have tried to used any of the object there my page are really slow, it like the server is forever to compile the site and when that is done the browser shows it in a flash.
You can see here :
[URL]
This is not a problem when using only ASP.NET.
When i debug in VS2008 i can see that is looking for some random files when compiling like C:AjaxBuildAjaxServerAjaxControlToolkitToolkitScriptManagerToolkitScriptManager.cs and alot of other stuff, it goes through alot of setting there and i think that is the hold up, why it's so slow.
I have Sp1 installed, running Windows 7 64bit.
These pages are very small and standard. I basicly drag a toolkitscriptmanager, htmleditor, textbox and two buttons to the form. There isnt more.
This is the code for the first page :
[Code]....
The host has AJAX support and has installed SP1 for .NET.
View 8 Replies
Feb 23, 2011
I have a situation where I need to have close to 30 drop down lists on one form. The user also wants the autocomplete functionality. I decided to use the ASP.NET AJAX control. So that the page will load faster I hide them until they are needed. But, as more and more become visible the postback time is getting longer and longer.
I know this can be fixed, but I'm not sure how. Can anyone give me any advice, point me to some articles? Do you have a suggestion for another method of doing what I need? Maybe, I shouldn't even be using ComboBoxes for this?
View 2 Replies
Sep 20, 2010
my page contain a dropdownlist which binding many list of data with no categories. While refresh in one update panel is very slow.
View 4 Replies
Apr 22, 2010
Why the ajax control is working slow when i upload to the server? such as the custom validator is slow response in the server, the modal popup box or loading is slow to response or close up after click the ok button. It work fast in the local server.
View 2 Replies
Mar 15, 2010
I have a question about how ASP.NET AJAX partial rendering actually works. Does it:
1) Renders the whole page on the server, transmits the whole page to the client, the client then merges just the area contained in the update panel.
2) Renders the whole page on the server, transmits and merges just the area contained by the update panel.
3) Renders, transmits and merges just the area contained by the update panel.
View 2 Replies
Aug 23, 2010
I have an .aspx page with multiple .ascx (User Controls on it). One of the User controls is very slow in loading (calls a very slow webservice for the data.). Now, my question is how to render all the controls on the page (so the User can view those) and have a rotating icon for this control (slow one) (till it loads). I know, I need to bring AJAX into picture, but any clarification on that would help as I will be new to AJAX programming.
View 4 Replies
Jul 22, 2010
I made a login system, when the user presses the login button a pop up panel using ajax appears. The textboxes and other features are in a Web User Control.
The problem is that when writing information in the textboxes in IE or pressing the cancel button it is very slow compared to other browsers. I have the latest version of Ajax.
View 3 Replies