Jquery table sorter causing slow script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sarahaziz
    New Member
    • Oct 2008
    • 17

    Jquery table sorter causing slow script

    Hello guys
    i have a problem i wish i could find a solution i created this instant chat system works fine i created this seTimeout to retrieve data when the messages exceeded an extent slow script alert started to appear when i tracked down the problem i found out that the data is retrieved in time longer than the call to setTimeout and since i use jquery table sorter don't realize that the data is a table until it is all retrieved so continuous slow script alerts are displayed till all table is retrieved.One more thing i retrieve data using ajax request
    Note: The number of rows to be retrieved is 257 rows
    How could i solve this problem?Any ideas .
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    When you make a call check if the data has been received/the request is complete. If it isn't, don't make another request.

    Comment

    • sarahaziz
      New Member
      • Oct 2008
      • 17

      #3
      I don't understand could you explain more.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        You mention that you retrieve data using setTimeout/an Ajax request. When you make this request, can you not check that the data has actually been received fully from the previous request? If it hasn't, don't make the next request.

        If that doesn't make sense, post the relevant code.

        Comment

        Working...