473,770 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4172
In message <11************ *********@g14g2 000cwa.googlegr oups.com>, Larry
<lp****@gmail.c om> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6090
by: Justice | last post by:
Currently I'm doing some experimenting with the XMLHTTP object in Javascript. Now, the XMLHttp object is asynchronous (at least in this case), and the following code causes a significant memory loss even though I seem to be allocaitng everything; help would be *vastly* appreciated. What am I doing wrong here? I thought I was doing everything correctly (setting things to null, for example) but none of the memory seems to get replaced. ...
2
460
by: tomvr | last post by:
Hello I have noticed some 'weird' memory usage in a vb.net windows app The situation is as follows I have an app (heavy on images) with 2 forms (actually there are more forms and on starting the app I load some things into memory for global use of the app but I'll use only 2 starting forms to explain the situation) situation 1 start app with form 1 (72mb memory usage), show form 2 and hide form 1 (89 mb memory usage
6
3278
by: Tom | last post by:
We have a VERY simple .NET C# Form Application, that has about a 23MB Memory Footprint. It starts a window runs a process and does a regular expression. I have done a GC.Collect to make sure that, no memory is lying around. GC reports only 84k of allocations. Starting 5-10 of this apps is going to start taking a considerable amount of memory. Is there a way to reduce this? Tom
3
4149
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database periodically. What happens, is that the app reads the contents of a text file line by line into an ArrayList. Each element of the ArrayList is a string representing a record from the file. The ArrayList is then processed, and the arraylist goes out of...
10
1976
by: lkagan2000 | last post by:
I'm reading 'Ajax in Action', (one of the best of the many tech books I've read) and there's an example that I just don't fully understand. If you happen to have the book, it's on page 75. I'm hoping someone can enlighten me. var loader = this; this.req.onreadystatechange = function() { loader.onReadyState.call(loader); }
8
4169
by: BillE | last post by:
I have an existing asp.net 2.0 webforms app using master/content pages, and it works fine. I added some Ajax elements, including some UpdatePanels and modal PopUp panels which contain asp.net controls like gridviews with selectable rows, buttons, textboxes. I'm using Ajax 1.0, and the users are still using IE 6. Some heavy users reported that the application starts to run slowly after a while, and task manager shows the memory usage...
7
2809
by: =?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?= | last post by:
Hi! I know this topic has been discussed a long way, but I haven't found any apparent solution (maybe I shouldn't be looking for a one :)) I have a very simple application with one page and with just ScriptManager object in it. Every time I refresh the page the memory usage goes up. I have AJAX extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem, and how did you guys cope with this problem? Please reply asap... i am...
8
6035
by: FrobinRobin | last post by:
Hi, I intend to use Ajax for a kiosk application, it's primary usage is to retrieve live data from my DB, it's a fairly small amount of data (5 fields, of small data size and limited to 15 rows). When I check my server logs I can see that the kiosk page has used a fair amount of bandwidth this month, this is obviously because a javascript timeout refreshes the data every 10 seconds. What I need to know is how to calculate the...
1
2047
by: Jean-Paul Calderone | last post by:
On Tue, 22 Apr 2008 14:54:37 -0700 (PDT), yzghan@gmail.com wrote: The test doesn't demonstrate any leaks. It does demonstrate that memory usage can remain at or near peak memory usage even after the objects for which that memory was allocated are no longer live in the process. This is only a leak if peak memory goes up again each time you create any new objects. Try repeated allocations of a large dictionary and observe how memory...
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.