Ajax and Memory Usage

L

Larry

I am wondering if anyone has any thoughts on the following issues once
Ajax is incorporated into a page:

Now that we have this Ajax stuff, users have the potential to not leave
a page for a long time. My knowledge of browser memory handling is
limited, but I spoke with a Microsoft engineer who told me that IE has
a very naive mark and sweep GC algorithm, which gets invoked when a
page gets reloaded.

If the GC is not invoked until a page reload, then doesn't this mean
that you have to be extremely careful when writing Ajax apps (object
pooling or other techniques)?

If anyone has any experience with memory management with Ajax apps,
please post. Also, if anyone has good links/docs on the memory
management models of Firefox and IE please let me know.

Thanks,

Larry
 
S

Stephen Kellett

Larry said:
If anyone has any experience with memory management with Ajax apps,
please post. Also, if anyone has good links/docs on the memory
management models of Firefox and IE please let me know.

Firefox calls the garbage collector on a regular basis.
I can't comment on IE as there is no easily accessible API for this (or
for any decent profiling - plenty of APIs for IE, but nothing of much
use for this topic).

Software Verification's JavaScript Performance Validator includes
statistics for how often and how long is spent in the garbage collector
as part of its performance statistics.

http://www.softwareverify.com

Stephen
 
K

khakman

Ah... great question. Especially since that was very much the bane of
the original challenges (and instability) of DHTML/JavaScript
development back in 1999-2001.

What we did at TIBCO General Interface (see http://developer.tibco.com
and the 8-minute webcast from InfoWorld's Jon Udell) was to implement
garbage collection as part of a client-side controller for managing the
JavaScript GUI, data, and communication objects that comprise the TIBCO
General Interface AJAX framework. We had to do this because the
original applications our AJAX framework drove back in 2001 were things
like chemogenomic drug discovery, electronic medical records, financial
services and other data and visualization and workflow intensive
applications. Relying on the browser's memory management alone in this
area was insufficient (doing so was a large part of why people
originally moved away from DHTML/JS applications). With TIBCO GI's
client-side MVC infrastructure we've been told that users can run a
TIBCO GI powered application all day with no issues. These are the
kinds of enterprise-grade things that we built into the TIBCO General
Interface product. Garbage collection, inheritance, and step-through
debugging services in the framework also enabled us to build a full
AJAX IDE as a browser-based AJAX application. Check out how GI can
take away many of the low-level plumbing issues with AJAX and give you
the tools to make very powerful AJAX apps very quickly. More info on
the GI Framework @ http://developer.tibco.com.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top