javascritp RIA and browser memory

I

itay

Greetings to all,
In one of my upcoming project we have a need to develop a RIA in
single-application-page where everything is loaded using ajax and all
kinds of tricks to change the UI
however, I am afraid that the browser memory will increase as the user
will work through the application.

The application design has a single entry point and from then the DOM
is manipulated to show or hide relevant views.
Can anyone point me to a good reference about the browser memory
management or suggest what is the best practice for such application.

We are going to use native JS with jquery.

any help will do...
Cheers!
 
R

Ry Nohryb

Greetings to all,
In one of my upcoming project we have a need to develop a RIA in
single-application-page where everything is loaded using ajax and all
kinds of tricks to change the UI
however, I am afraid that the browser memory will increase as the user
will work through the application.

The application design has a single entry point and from then the DOM
is manipulated to show or hide relevant views.
Can anyone point me to a good reference about the browser memory
management or suggest what is the best practice for such application.

We are going to use native JS with jquery.

any help will do...
Cheers!

Hi,

There's a lot of differences in this respect. Basically, Chromes and
Operas will just crash badly at about 600MB..800MB of memory usage,
Firefox will allow for much more than that (and will throw a nice
exception instead of just crashing) but will slow down a lot, as far
as I can see, and Safari will happily allocate as much as solicited,
like crazy, up to several GigaBytes (I cut it at ~4500MB, when in the
activity monitor it was displaying an allocation of more than 9GB of
virtual memory), forcing the OS to swap out to disk if needed.

Also, the size of strings is in most browsers limited to 256Mb (Mega-
chars, really?). Again, not in Safari. (last time I checked, which is
quite a long time ago).

Here's a test you can use to force the browser to allocate memory like
crazy:

http://jorgechamorro.com/cljs/107/

It just creates strings of 1MB (*) in a loop, filled with random
chars, and pushes them into an array.

(*)1 mega-character strings, really. I guess that's more likely 2MB in
most browsers, as a char in JS is 16bits. So perhaps the browser's
limits stated above are more likely about twice as much.
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top