Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Why page is slow?

Why page is slow?

Scheduled Pinned Locked Moved ASP.NET
announcementjavascripthtmlcsssysadmin
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tonymathewt
    wrote on last edited by
    #1

    I have created a page that stores a DataSet in a session variable and remove the session variable once the user navigates away from it. There are about 5 grids each with about 4 columns and 3-4 rows and two Developer Express comboboxes which I could see from the view source writing a lot of scripts. I have them all put inside an update panel. The problem is the page is taking too much time b/w postbacks(async). The yslow shows the following in F grade: -Make Fewer HTTP requests -Use a content Delivery Network -Add Expires headers -Minify Javascript and CSS -Configure entity tags. These two D grades: -Minify Javascript and CSS -Configure entity tags. This one in E grade: -Reduce the number of DOM elements. My browser is IE 7. To my surprise the page is pretty faster in the latest version of FireFox.

    C A 2 Replies Last reply
    0
    • T tonymathewt

      I have created a page that stores a DataSet in a session variable and remove the session variable once the user navigates away from it. There are about 5 grids each with about 4 columns and 3-4 rows and two Developer Express comboboxes which I could see from the view source writing a lot of scripts. I have them all put inside an update panel. The problem is the page is taking too much time b/w postbacks(async). The yslow shows the following in F grade: -Make Fewer HTTP requests -Use a content Delivery Network -Add Expires headers -Minify Javascript and CSS -Configure entity tags. These two D grades: -Minify Javascript and CSS -Configure entity tags. This one in E grade: -Reduce the number of DOM elements. My browser is IE 7. To my surprise the page is pretty faster in the latest version of FireFox.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      tonymathewt wrote:

      I have created a page that stores a DataSet in a session variable and remove the session variable once the user navigates away from it.

      Sounds dumb to me.

      tonymathewt wrote:

      To my surprise the page is pretty faster in the latest version of FireFox.

      No surprises there. I would check to see how long your database calls take, I would check to see how the update panel performs ( fast AJAX means writing your own code, the ASP.NET library is far from efficient ), and I'd check to see what I was databinding if I don't need to. I'd also check viewstate size to see if I'm posting a massive page every time. You could have the data from your dataset in viewstate, and have it stored in the session as well. \

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      T 1 Reply Last reply
      0
      • T tonymathewt

        I have created a page that stores a DataSet in a session variable and remove the session variable once the user navigates away from it. There are about 5 grids each with about 4 columns and 3-4 rows and two Developer Express comboboxes which I could see from the view source writing a lot of scripts. I have them all put inside an update panel. The problem is the page is taking too much time b/w postbacks(async). The yslow shows the following in F grade: -Make Fewer HTTP requests -Use a content Delivery Network -Add Expires headers -Minify Javascript and CSS -Configure entity tags. These two D grades: -Minify Javascript and CSS -Configure entity tags. This one in E grade: -Reduce the number of DOM elements. My browser is IE 7. To my surprise the page is pretty faster in the latest version of FireFox.

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        Yes there are lots of things that improves performance of your page. Writing Dataset to Session variable is really not good. Remove viewState by using EnableViewState ="false" if you are not using it. this would reduce the page size by a lot. Minify javascript means removing whitespaces from javascript. I always use minified javascript for requests. And if possible, apply a cache header to the CSS and JS files. Reduce the number of DOM elements means reducing large no of hiddenfield, Tables, Divs, etc. Just reduce them and apply CSS to position it perfectly. You might use Compress-Response-and-HTML-WhiteSpace-Remover[^] to compress your page. By this way you need to create others. :cool:

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Simplify Code Using NDepend
        Basics of Bing Search API using .NET
        Microsoft Bing MAP using Javascript

        T 1 Reply Last reply
        0
        • C Christian Graus

          tonymathewt wrote:

          I have created a page that stores a DataSet in a session variable and remove the session variable once the user navigates away from it.

          Sounds dumb to me.

          tonymathewt wrote:

          To my surprise the page is pretty faster in the latest version of FireFox.

          No surprises there. I would check to see how long your database calls take, I would check to see how the update panel performs ( fast AJAX means writing your own code, the ASP.NET library is far from efficient ), and I'd check to see what I was databinding if I don't need to. I'd also check viewstate size to see if I'm posting a massive page every time. You could have the data from your dataset in viewstate, and have it stored in the session as well. \

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          T Offline
          T Offline
          tonymathewt
          wrote on last edited by
          #4

          Thank you Christian I am actually updating the dataset to the Data base before removing (trying to reduce the Database hits). Updates are done directly on this dataset and then used for adaptor.update(). The dataset is kept in a session variable b/w postbacks. Do you find anything wrong with this approach?

          1 Reply Last reply
          0
          • A Abhishek Sur

            Yes there are lots of things that improves performance of your page. Writing Dataset to Session variable is really not good. Remove viewState by using EnableViewState ="false" if you are not using it. this would reduce the page size by a lot. Minify javascript means removing whitespaces from javascript. I always use minified javascript for requests. And if possible, apply a cache header to the CSS and JS files. Reduce the number of DOM elements means reducing large no of hiddenfield, Tables, Divs, etc. Just reduce them and apply CSS to position it perfectly. You might use Compress-Response-and-HTML-WhiteSpace-Remover[^] to compress your page. By this way you need to create others. :cool:

            Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


            My Latest Articles-->** Simplify Code Using NDepend
            Basics of Bing Search API using .NET
            Microsoft Bing MAP using Javascript

            T Offline
            T Offline
            tonymathewt
            wrote on last edited by
            #5

            Abhishek, I need to reduce DataBase hits that's why I am keeeping the DataSet in Session variable.

            Abhishek Sur wrote:

            Remove viewState by using EnableViewState ="false" if you are not using it.

            Do you mean to set this property for each control?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups