469,950 Members | 2,348 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Ajax and Memory Usage

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

Nov 23 '05 #1
2 3956
In message <11*********************@g14g2000cwa.googlegroups. com>, Larry
<lp****@gmail.com> writes
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
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
Nov 23 '05 #2
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.

Larry wrote:
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


Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by tomvr | last post: by
10 posts views Thread by lkagan2000 | last post: by
8 posts views Thread by BillE | last post: by
7 posts views Thread by =?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?= | last post: by
8 posts views Thread by FrobinRobin | last post: by
1 post views Thread by Jean-Paul Calderone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.