?
Solved

Frequent AJAX-requests slow down browser

Posted on 2009-04-16
5
Medium Priority
?
711 Views
Last Modified: 2013-11-19
We have implemented an administration interface in AJAX, which shows a realtime "live log" of events (read from a mysql DB). The interface shows only the last e.g. 100 recent events.

i'm told that after heavy usage for about an hour (without a complete page reload, only AJAX requests), the interface/browser becomes slower and slower, sometimes even crashes.

This might be due to more and more data being accumulated (in the browser cache?) and not properly cleaned up.

(How) can i avoid this anyhow? How do other realtime-system powered by AJAX (chats?) solve this issue?

Or is it something else?
0
Comment
Question by:thomers1
  • 3
5 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24157988
depending on how you implemented your page the following can occur.

The div, table whatever you are using is filling up with more and more text --> Display only the newest and remove older entries when adding new ones.

The request/response data is not invalidated and is kept in memory --> Throw away old request/response objects.

What framework are you using for your ajax or are you doing all by yourself?
0
 
LVL 12

Expert Comment

by:alien109
ID: 24157993
Does this issue happen in Firefox and IE, or only IE?

Can you post some code? It's possible that your code structure is preventing garbage collecting from happening which over time could start to cause performance issues.
0
 

Author Comment

by:thomers1
ID: 24167099
we only use FF for the admin interface.

we are using mootools and mochaUI

> The request/response data is not invalidated and is kept in memory -->
> Throw away old request/response objects.
how do you check and ensure that its properly thrown away?


0
 

Author Comment

by:thomers1
ID: 24465939
update: or should we prefer to rewrite this using some other technology? flex maybe?
0
 

Accepted Solution

by:
thomers1 earned 0 total points
ID: 24466024
(see my other question about other technologies http://www.experts-exchange.com/Web_Development/WebApplications/Q_24435639.html )
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question