Debug Application - Relatively Slow
Apr 23, 2010why is it that when i debug my application in chrome it is relatively slow between postbacks compared to internet explorer? when i use internet explorer, its lightning fast.
View 6 Replieswhy is it that when i debug my application in chrome it is relatively slow between postbacks compared to internet explorer? when i use internet explorer, its lightning fast.
View 6 Replies I have two applications(A,B) both are developed in .NET3.5 and used LDAP services.Application-A in one screen we are fetching users with role "project Leads" and it is taking 10 min time
Application-B in login screen we are checking user is authenticated or not and it is taking 20 sec
Both the applications are using the same service then way there is a time span problem. Please suggest me what can I do to improve performance of application A?
I want to debug EditPanel.debug.js file of HTML Editor, but it never shows in VS 08 and Im sure it executes to that line.What I did to enable debuggingUnchecked both 2 checkboxes for disabling the debugging
Set ScriptMode="Debug"
Change following line
[ClientScriptResource("AjaxControlToolkit.HTMLEditor.EditPanel", "AjaxControlToolkit.HTMLEditor.EditPanel.js")]
to
[ClientScriptResource("AjaxControlToolkit.HTMLEditor.EditPanel", "AjaxControlToolkit.HTMLEditor.EditPanel.debug.js")]
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
I am developing sample web application which use C#, and LINQ to SQL. The application is very very slow and it takes about 2 secs to navigate between pages. I have already used SQL Profiler and monitor the calls to the SQL server. All SQLs looks normal to me and their execution time is always about 1 or 2 millisecs.I tried the same application in another PC and it is the same. So, it is not because of my computer performance.
View 3 RepliesMy application runs quickly when debugging locally, but slows down to an almost unusable state once published. Oddly, the published version seems to be grabbing data very quickly from MSSQL - it's the part where I'm updating datatables and gridviews that is very slow. For example:
[Code]....
I know that when a .NET web application first starts, it will be slow on first access. For that reason, I created a 'keep alive' page in the application that is requested every 8 minutes or so by a scheduled process. I hoped that that would be sufficient to prevent the application from 'unloading' and thus suffer from this initial long startup time again and again.
I can see in my logs that the 'keep alive' page is indeed triggered every 8 minutes, 24 hours a day. But when I actively start working in the application after some time, eg. the following day, I still have to wait a while for it to start up. Once the first page is loaded, all is fine again.
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?
I have one ASP.NET Application (VS.NET 2005). In that i have one scenario where i have to display 500 records per page (Not less than that bcoz this is client requirement to display 500 records per page) in the Gridview. This functionality is working fine but the application is becoming very slow.Can anybody tell me the solution for increasing performance in this case ?
View 2 RepliesI have a simple web application that loads very slow the very first time after i deploy it. I am using ASP.NET 3.5 SP1 / VS 2008 / Linq / Web forms to load the default.aspx home page. It is a very light page with nothing too fancy.Now to debug this load issue, I logged all the events in the global file and got the following log text:
2010-04-10 11:58:38,083 - Application_Start
2010-04-10 11:58:38,111 - Application_BeginRequest
2010-04-10 11:58:38,117 - Application_AuthenticateRequest
2010-04-10 11:58:52,321 - Session_Start
2010-04-10 11:58:52,454 - Page_Load
2010-04-10 11:58:53,951 - End Page_load
2010-04-10 11:58:53,981 - Application_EndRequest
Now my question is, between the Application_AuthenticateRequest and Session_Start functions, there is generally around 10 - 15 seconds - which i believe seems to be the problem.The thing, I am unsure why this is slow between these two functions.I am not using any forms authentication.Also, I am not doing anything fancy in the global file besides setting a session variable.
In Many Interview they have asked me that.
How would u debug web application in .net?
I Say the using F10, F11 but this is not the correct answer.
I have developed a web application in asp.net with c# with out using master page. I have developed this application in iframe.
The problem is that my application run smoothly but suddenly it stops and do some processing and it run again smoothly.
it stops any where on page load, on button click, on checkbox changed. i can not tell where it stops
it stops only when page post. i can see the processbar on browser's statusbar it stop for long time 40 to 60 seconds and after that i fire same event now process complets within 2 to 5 seconds
Hosting server detail :
1. IIS 6.0
2. Window server 2003.
3. Sql server 2005.
I have made an asp.net web application using VS 2008 to show crystal reports. I have used CrystalReportViewer control to show reports.
The table (sql server 2005 ) from which I have to fetch data has approximately 400000 records. I connect to it using OLEDB ( Microsoft OLEDB provider for sql server )
I have wrote the following code to achieve this :
[code]....
I have developed an application that interacts with IBM ClearQuest. The problem is that when I run everything locally, such as, run the webservice local and then ASP page local everything is at the speed I expect. When I post the webservice (precompiled) to the server and run the web page through the server, the call to the webmethod takes at least 10x the amount of time it should. I dont know why this is happening. I made a console application that has the function in question and execute it on the server and locally and they both return the same amounts of time (roughly) its just when I move to executing via the webmethod everything grinds to a snails pace. Any ideas? This happens every time not just on the first call.
WebMethod:
Public Function RetrieveQueryResults(ByRef cqSession As ClearQuestOleServer.Session, _
ByVal sqlStmt As String) As List(Of SearchResultsSingleIssue)
Dim numCols As Integer, status As Integer, columnIdx As Integer
Dim numRows As Integer
Dim rowContents As String = ""
Dim colValue As New Object
Dim colLabel As New Object
Dim allitems As New List(Of SearchResultsSingleIssue)
Dim results As New SearchResultsSingleIssue
Dim cqResultSet As ClearQuestOleServer.OAdResultset
cqResultSet = cqSession.BuildSQLQuery(sqlStmt)
cqResultSet.Execute()
' Get the number of columns returned by the query.
numRows = 0
numCols = cqResultSet.GetNumberOfColumns
status = cqResultSet.MoveNext
' Collect query results.
Do While status = AD_SUCCESS
results = New SearchResultsSingleIssue
numRows = numRows + 1
For columnIdx = 1 To numCols
colLabel = cqResultSet.GetColumnLabel(columnIdx)
colValue = cqResultSet.GetColumnValue(columnIdx)
'Make sure that we dont pass along a null reference
If colValue = Nothing Then
colValue = ""
End If
Select Case colLabel
Case "ID"
results.IssueID = colValue
Case "HEADLINE"
results.Headline = colValue
Case "NAME"
results.State = colValue
Case "OE_CONTACT"
results.OEContact = colValue
Case "DESCRIPTION"
results.Further_Description = colValue
Case "PRODUCT_NAME"
results.Product_Name = colValue
Case "FUNCTIONAL_AREA"
results.Functional_Area = colValue
Case "SUBTOPIC"
results.Subtopic = colValue
Case "FOUND_VERSION"
results.Found_In = colValue
Case "SCHEDULED_VERSION"
results.Scheduled_For = colValue
Case "SYMPTOMS"
results.Symptoms = colValue
Case "AFFECTED_SYSTEMS"
results.Affected_System_Types = colValue
Case "ISSUE_TYPE"
results.Issue_Type = colValue
Case "ASSIGNED_TO"
results.Assigned_Developer = colValue
Case "TESTED_BY"
results.Assigned_Tester = colValue
Case "BUILT_VERSION"
results.Built_In = colValue
Case "TESTED_VERSION"
results.Tested_In = colValue
Case "NOTES_LOG"
results.Notes_Log = colValue
Case "CUSTOMER_SEVERITY"
results.Severity = colValue
Case "PRIORITY"
results.Priority = colValue
End Select
Next columnIdx
' Add the query row result to the compiled list of all rows.
allitems.Add(results)
status = cqResultSet.MoveNext
Loop
Return allitems
End Function
Local Windows Application Method:
private void button2_Click(object sender, EventArgs e)
{
start = DateTime.Now.TimeOfDay.Seconds;
int numCols = 0;
int status = 0;
int columnIdx = 0;
int numRows = 0;
string rowContents = "";
string colValue;
string colLabel;
List<SearchResultsSingleIssue> allitems = new List<SearchResultsSingleIssue>();
SearchResultsSingleIssue results = new SearchResultsSingleIssue();
ClearQuestOleServer.OAdResultset cqResultSet = default(ClearQuestOleServer.OAdResultset);
cqResultSet = (ClearQuestOleServer.OAdResultset)ClearQuestSession.BuildSQLQuery(sqlStatement);
cqResultSet.Execute();
// Get the number of columns returned by the query.
numRows = 0;
numCols = cqResultSet.GetNumberOfColumns();
status = cqResultSet.MoveNext();
// Collect query results.
while (status == 1)
{
results = new SearchResultsSingleIssue();
numRows = numRows + 1;
for (columnIdx = 1; columnIdx <= numCols; columnIdx++)
{
colLabel = (string)cqResultSet.GetColumnLabel(columnIdx);
colValue = (string)cqResultSet.GetColumnValue(columnIdx);
//Make sure that we dont pass along a null reference
if (colValue == null)
{
colValue = "";
}
switch (colLabel)
{
case "ID":
results.IssueID = colValue;
break;
case "HEADLINE":
results.Headline = colValue;
break;
case "NAME":
results.State = colValue;
break;
case "OE_CONTACT":
results.OEContact = colValue;
break;
case "DESCRIPTION":
results.Further_Description = colValue;
break;
case "PRODUCT_NAME":
results.Product_Name = colValue;
break;
case "FUNCTIONAL_AREA":
results.Functional_Area = colValue;
break;
case "SUBTOPIC":
results.Subtopic = colValue;
break;
case "FOUND_VERSION":
results.Found_In = colValue;
break;
case "SCHEDULED_VERSION":
results.Scheduled_For = colValue;
break;
case "SYMPTOMS":
results.Symptoms = colValue;
break;
case "AFFECTED_SYSTEMS":
results.Affected_System_Types = colValue;
break;
case "ISSUE_TYPE":
results.Issue_Type = colValue;
break;
case "ASSIGNED_TO":
results.Assigned_Developer = colValue;
break;
case "TESTED_BY":
results.Assigned_Tester = colValue;
break;
case "BUILT_VERSION":
results.Built_In = colValue;
break;
case "TESTED_VERSION":
results.Tested_In = colValue;
break;
case "NOTES_LOG":
results.Notes_Log = colValue;
break;
case "CUSTOMER_SEVERITY":
results.Severity = colValue;
break;
case "PRIORITY":
results.Priority = colValue;
break;
}
}
// Add the query row result to the compiled list of all rows.
allitems.Add(results);
status = cqResultSet.MoveNext();
}
seconds = (DateTime.Now.TimeOfDay.Seconds - start);
label3.Text = seconds.ToString();
}
The code should execute in about...6 seconds.
In application all sql connection close properly, Also when user log out its connection close still sql process memory increase in RAM and after some time Application slow down.
View 3 RepliesI'm trying to implement AJAX within an existing application and it seems to be running slow.
I have 3 datallist that all have checkboxs. I have buttons that all users to check all checkbox for a specific datalist. I have an update panel around each datalist. When I check and uncheck it seems to be really slow. I also have 3 textboxes and 4
buttons within my update panel.
When I user uses this site it hides and shows different panels and that seems to be really slow when the users press a button. There is no database stuff happening when the slowness occurs.
I am currently developing a silverlight application, however yesterday I started getting the following error message every time I run the project:
If I click "yes" to debug - nothing happens. Also, I have no Line 1805 in any of my source files!
This error message started appearing yesterday, and appears as soon as I run the project, shortly before the first page loads. If i click yes or no, the project then loads and runs perfectly, I cannot see any unwanted behaviour.
I have been using source control, so I rolled back the project to a point before the error started appearing, however I am still getting the error!
Could it be a setting in VS Web Developer Express 2010 that I have accidentally changed?
I've noticed as my website gets bigger and bigger, the time my laptop takes to display my page is much longer then say a new projects with minimal references. I think there are two variables at play that affect ASP.NET warm-up time:
The quantity of external references The time it takes for a worker process to new() up each instance per worker process Additional time for the WCF objects as the ServiceHost may be in an external DLL First, are those the correct variables to take into account when considering ASP.NET startup time? Next, it appears that web.config may dispatch other objects for use with certain filetypes (*.svc, *.aspx, Windows Identity Foundation (WIF), etc. ). This too may cause delays in ASP.NET.
Last, my project is created as a "web project" not a "web site". Not sure if this has an impact. Is my theory full of holes, or is there something I can do to make development on a old laptop any better?
I'm working on an application (a web application, asp.net and c#) which is datetime-dependent, so, based on the current date, it will launch forms for the logged user to fill in.
I've been thinking about how we're going to simulate real usage of the application, for debugging and testing purposes.
So I'm talking about replacing all those:
DateTime currentDate = DateTime.Now;
with something like:
DateTime currentDate = MyDateClass.GetCurrentDate();
And then I'll have a class:
public class MyDateClass
{
private DateTime _currentDate;
public DateTime GetCurrentDate()
{
// get the date, which may be different from DateTime.Now
return _currentDate;
}
public void SetCurrentDate(DateTime newCurrentDate)
{
// set the date to the value chosen by the user
_currentDate = newCurrentDate;
}
}
allowing me to set the current data, by invoking the SetCurrentDate method, for example, in the code-behind of a link button and a calendar input.
how should I exactly store the DateTime variable, throughout all the application? I can't work with the session in this class, right? Should I work with the Thread?
[code]....
I want to know what are the ways to debug the application after deployment. Let's say I have used x-copy deployment, to copy dll and also some source code files. If I want to modify some source code and recopy them into production. Can somebody tell me how to debug those modified files?
View 2 Replieshow we can debugg a page from mobile emulator in web application.
View 1 RepliesI've defined a route in Application_Start, as so many tutorials have instructed
RouteTable.Routes.Add(
"Files",
new Route("Files/Art",
new FileRouteHandler()));
And created my own RouteHandler. However this doesn't seem to work at all.When I debug the application, I can see (via a break point) that the route gets added, however when I browse to "http://localhost/MyApplication/Files/Art" I get a browser 404 (not an ASP.net 404).
Let's say you set maxRequestLength to the max number (2097151) (units are KB) and use the following code for your OnClick event for your submit button:
int int fileSize = FileUpload1.PostedFile.ContentLength;
if (fileSize < 2000000)//units are bytes
Label1.Text="too big";
else
{
FileUpload1.SaveAs(saveItHerePath);
Label1.Text = "Upload success.";
}
Why when a huge file is attempted does it take a minute to get to the OnClick event on the server? Because if maxRequestLength were set to that value 2000, it would immediately choke if you tried to upload a 500MB file. What is going on here? What are the best practices for using the FileUpload control? Is there a better alternative way of uploading or checking for file size?
I have an asp.net application which works fine in debug mode but gives a error when i access the default.aspx
after deploying to IIS.
I am developping an MVC3 RC2 application and just after hitting F5 on my asp web application, I am getting this error message program '[7780] w3wp.exe: Managed (v4.0.30319)' has exited with code -2 (0xfffffffe).So I am totally unable to debug my application
View 10 Replies