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. General Programming
  3. C#
  4. Ajax slowing my search???

Ajax slowing my search???

Scheduled Pinned Locked Moved C#
questionhelpworkspace
10 Posts 4 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.
  • C Offline
    C Offline
    Chris McGlothen
    wrote on last edited by
    #1

    I wasn't sure where to put this dilemma, but here it goes. I have a web application wrapped around a state machine workflow that allows the user to pick search parameters from one content pane and then displays the results in the parallel pand via a gridview. I've wrapped both panes in and am using ajax extenders (Calendars and Watermark) in the search pane. I also have the search parameters saved into a Dictionary object. Unfortunately this is slowing down this portion of the application to a crawl. I'm at a loss as to what is causeing the delays, which happen both on ititial page load and when search button is clicked. I'm using some ajax extenders in other portions of the application with no detriment. I would provide code samples if you think they'll help, just ask:) Any suggestions or leads would be much appreciated. Thanks,


    An American football fan - Go Seahawks! Lil Turtle

    C 1 Reply Last reply
    0
    • C Chris McGlothen

      I wasn't sure where to put this dilemma, but here it goes. I have a web application wrapped around a state machine workflow that allows the user to pick search parameters from one content pane and then displays the results in the parallel pand via a gridview. I've wrapped both panes in and am using ajax extenders (Calendars and Watermark) in the search pane. I also have the search parameters saved into a Dictionary object. Unfortunately this is slowing down this portion of the application to a crawl. I'm at a loss as to what is causeing the delays, which happen both on ititial page load and when search button is clicked. I'm using some ajax extenders in other portions of the application with no detriment. I would provide code samples if you think they'll help, just ask:) Any suggestions or leads would be much appreciated. Thanks,


      An American football fan - Go Seahawks! Lil Turtle

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

      AJAX means I'd have stuck with the ASP.NET forum ( where you've also posted this ) Perhaps your code is making too many AJAX callbacks and that is slowing it down ?

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      C 1 Reply Last reply
      0
      • C Christian Graus

        AJAX means I'd have stuck with the ASP.NET forum ( where you've also posted this ) Perhaps your code is making too many AJAX callbacks and that is slowing it down ?

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        C Offline
        C Offline
        Chris McGlothen
        wrote on last edited by
        #3

        I was maybe thinking that the ajax may have been slowing down the Dictionary of search parameters, the search inputs first try and get any previous parameters when the page is initialized. Sorry for cross posting, I was just trying to cover my bases. Thanks for the response, I'll look into it. :-D


        An American football fan - Go Seahawks! Lil Turtle

        L 1 Reply Last reply
        0
        • C Chris McGlothen

          I was maybe thinking that the ajax may have been slowing down the Dictionary of search parameters, the search inputs first try and get any previous parameters when the page is initialized. Sorry for cross posting, I was just trying to cover my bases. Thanks for the response, I'll look into it. :-D


          An American football fan - Go Seahawks! Lil Turtle

          L Offline
          L Offline
          Larantz
          wrote on last edited by
          #4

          How do you build up the rows in your grid? Do you create an array of rows and add them all at the end, or do you add one at a time? I've seen codes adding items to DataGridView one at a time and I think the grid does some 'OnAddedItem' handling like trying to refresh etc because when I changed it to adding arrays of data instead, the processing time was cut down to 1/3d. -Larantz

          for those about to code, we salute you
          http://www.tellus-software.com

          C 1 Reply Last reply
          0
          • L Larantz

            How do you build up the rows in your grid? Do you create an array of rows and add them all at the end, or do you add one at a time? I've seen codes adding items to DataGridView one at a time and I think the grid does some 'OnAddedItem' handling like trying to refresh etc because when I changed it to adding arrays of data instead, the processing time was cut down to 1/3d. -Larantz

            for those about to code, we salute you
            http://www.tellus-software.com

            C Offline
            C Offline
            Chris McGlothen
            wrote on last edited by
            #5

            Larantz wrote:

            How do you build up the rows in your grid?

            I retrieve a Data Set from a database table via NetTiers. How did you handle populating the GridView? Using the DataBound to create array, then ItemCreated? Thanks for the insight though.


            An American football fan - Go Seahawks! Lil Turtle

            Steve EcholsS L 2 Replies Last reply
            0
            • C Chris McGlothen

              Larantz wrote:

              How do you build up the rows in your grid?

              I retrieve a Data Set from a database table via NetTiers. How did you handle populating the GridView? Using the DataBound to create array, then ItemCreated? Thanks for the insight though.


              An American football fan - Go Seahawks! Lil Turtle

              Steve EcholsS Offline
              Steve EcholsS Offline
              Steve Echols
              wrote on last edited by
              #6

              Could be viewstate "bloat". Are you using firefox with firebug? If so you can check out the http requests and responses in the console window and see what's being passed back and forth.


              - S 50 cups of coffee and you know it's on!

              • S
                50 cups of coffee and you know it's on!
                Code, follow, or get out of the way.
              C 1 Reply Last reply
              0
              • C Chris McGlothen

                Larantz wrote:

                How do you build up the rows in your grid?

                I retrieve a Data Set from a database table via NetTiers. How did you handle populating the GridView? Using the DataBound to create array, then ItemCreated? Thanks for the insight though.


                An American football fan - Go Seahawks! Lil Turtle

                L Offline
                L Offline
                Larantz
                wrote on last edited by
                #7

                Chris McGlothen wrote:

                I retrieve a Data Set from a database table via NetTiers.

                Ok.With DataSet I don't think the row generation is an issue.

                Chris McGlothen wrote:

                How did you handle populating the GridView? Using the DataBound to create array, then ItemCreated?

                Well in a normal case I'd use BindingList to handle the populating of the grid. The example I was refering to before was initially just building up string[] arrays with column values and then adding them to the grid. As a quickfix I just changed that into creating arrays of finished DataGridViewCells and adding the entire array to the grid. If I had the time, I'd go for a BindingList though. Best regards! -Larantz

                for those about to code, we salute you
                http://www.tellus-software.com

                C 1 Reply Last reply
                0
                • L Larantz

                  Chris McGlothen wrote:

                  I retrieve a Data Set from a database table via NetTiers.

                  Ok.With DataSet I don't think the row generation is an issue.

                  Chris McGlothen wrote:

                  How did you handle populating the GridView? Using the DataBound to create array, then ItemCreated?

                  Well in a normal case I'd use BindingList to handle the populating of the grid. The example I was refering to before was initially just building up string[] arrays with column values and then adding them to the grid. As a quickfix I just changed that into creating arrays of finished DataGridViewCells and adding the entire array to the grid. If I had the time, I'd go for a BindingList though. Best regards! -Larantz

                  for those about to code, we salute you
                  http://www.tellus-software.com

                  C Offline
                  C Offline
                  Chris McGlothen
                  wrote on last edited by
                  #8

                  Nice! Thanks for the tip. I've not had the opportunity to try using a BindingList yet, I'll have to give it a go. Cheers :beer:


                  An American football fan - Go Seahawks! Lil Turtle

                  1 Reply Last reply
                  0
                  • Steve EcholsS Steve Echols

                    Could be viewstate "bloat". Are you using firefox with firebug? If so you can check out the http requests and responses in the console window and see what's being passed back and forth.


                    - S 50 cups of coffee and you know it's on!

                    C Offline
                    C Offline
                    Chris McGlothen
                    wrote on last edited by
                    #9

                    I have all the AJAX extensions set to disable ViewState already, but thanks.

                    Steve Echols wrote:

                    If so you can check out the http requests and responses in the console window

                    Is there a way to do this in IE? Cheers :beer:


                    An American football fan - Go Seahawks! Lil Turtle

                    Steve EcholsS 1 Reply Last reply
                    0
                    • C Chris McGlothen

                      I have all the AJAX extensions set to disable ViewState already, but thanks.

                      Steve Echols wrote:

                      If so you can check out the http requests and responses in the console window

                      Is there a way to do this in IE? Cheers :beer:


                      An American football fan - Go Seahawks! Lil Turtle

                      Steve EcholsS Offline
                      Steve EcholsS Offline
                      Steve Echols
                      wrote on last edited by
                      #10

                      There's a tool called Fiddler[^], but I can't get it to work on my machine. You might have better luck though!


                      - S 50 cups of coffee and you know it's on!

                      • S
                        50 cups of coffee and you know it's on!
                        Code, follow, or get out of the way.
                      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