Link to home
Start Free TrialLog in
Avatar of thomers1
thomers1

asked on

Frequent AJAX-requests slow down browser

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?
Avatar of ChristoferDutz
ChristoferDutz
Flag of Germany image

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?
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.
Avatar of thomers1
thomers1

ASKER

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?


update: or should we prefer to rewrite this using some other technology? flex maybe?
ASKER CERTIFIED SOLUTION
Avatar of thomers1
thomers1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial