Slow website after some time (with ajax interval of 10 seconds)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dlegendkiller
    New Member
    • Mar 2014
    • 2

    Slow website after some time (with ajax interval of 10 seconds)

    Hi. I have created a Hotel Management System which is loaded with scripts especially ajax.

    The main interface comprises of checked in guests which is being updated/refreshed every 10 seconds.

    The reason for that is to inform the user (cashier) that a guest's stay is over.

    The problem is, when I have 80 or more rows (checkin), the system slows down. It's consuming a lot of memory.

    My resolution was to upgrade the RAM to 6GB and increase the cache size of google chrome to 200MB.

    Unfortunately, the problem still exists.

    I appreciate your help and time. Thank you.

    PS I attached an image of the user interface.
    Attached Files
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    do you have an AJAX request for each row? or do you get all the updated data in one request?

    Comment

    • dlegendkiller
      New Member
      • Mar 2014
      • 2

      #3
      Hi Dormilich. Thanks for spending your time helping me with this.

      The function contains a lot of ajax requests but the data is not requested per row.

      Here's the code for your reference. THanks.

      The function starts from Line 9 to 158.

      Last edited by dlegendkiller; Mar 3 '14, 07:38 AM. Reason: update

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        the problem I see is line #76. each time the getContents() function runs, you add another click handler.

        Comment

        Working...