Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7714495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:08:31+00:00 2026-06-01T02:08:31+00:00

I have asked this question ever before and it seems I didn’t 100% resolved

  • 0

I have asked this question ever before and it seems I didn’t 100% resolved it. Please see link
A search aspx page return slow, I disable the IIS logs, but it seems still load slowly.

I have a asp.net website, there is a searchResult.aspx, it runs a sql script to retrieve data from MS SQL server database, and then put the data into a HTML format, the website has been deployed in IIS7.5 Server. I have implemented both static and dynamic compression, that means all my js, css and aspx page have been compressed before rendered to browser.

Unfortunately the searchResult.aspx return very slow, if search for a big word, like biography, it averagely takes more than 10 seconds to return. and I used firebug Net to trace it, the blocking, DNS Lookup, Connecting and Sending all take no more than 10ms, but the Waiting takes over 10 seconds. So I added some code to the beginning and end of function Page_Load(object sender, EventArgs e) and also the begining and end of HTML body element, like below:

protected Stopwatch stopwatch = new Stopwatch();
protected void Page_Load(object sender, EventArgs e)
 {
     stopwatch.Start();
     ....
     stopwatch.Stop();
     timeForSearch = stopwatch.Elapsed.Milliseconds;
  }


   <body>
    <%
     stopwatch.Reset();
     stopwatch.Start();
    %>
    ....
   <%stopwatch.Stop();%>
  <%=timeForSearch%>+<%=stopwatch.Elapsed.Milliseconds%>=       <%=stopwatch.Elapsed.Milliseconds + timeForSearch%>

enter image description here

OK, you can see the pic, the highlight is the millinseconds elapsed, but why it took 4.8 seconds to load.

Any help will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:08:33+00:00Added an answer on June 1, 2026 at 2:08 am

    Ok, I thought I found out the reason why the search page load slowly, just all of your concerns, it is because of SQL script, the reason why I didn’t notice it is because the code error, I used the

    stopwatch.Elapsed.Milliseconds
    

    Actually I should use

    stopwatch.ElapsedMilliseconds
    

    The difference between them are in Difference between ElapsedTicks, ElapsedMilliseconds, Elapsed.Milliseconds and Elapsed.TotalMilliseconds? (C#). And it finally shows me that my Page_Load() method takes sometimes more than 5, or 7 seconds to load according to the search term.

    So I will need to improve the sql script, cause it is very big, so I will not write down it. Anyway thanks all you guys, I was inspired by your concerns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asked this question before and the problem was half solved in the
Possible Duplicate: optimal algorithm for finding unique divisors I have asked this question before,
This is probably the simplest question ever asked, but if I have a running
This may be the silliest question i have ever asked here, but i just
i have asked this question before and it was closed because i was unable
i have asked this question before but no answer was there. so asking again.
This is a followup to a question I asked yesterday: Have you ever had
i have asked this question before but the answer received was not applicable in
Before I asked this question I had a look through the search results for
I have asked this question on Telerik forums with no reply so I'm turing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.