Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > javascritp RIA and browser memory

Reply
Thread Tools

javascritp RIA and browser memory

 
 
itay
Guest
Posts: n/a
 
      02-14-2011
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!
 
Reply With Quote
 
 
 
 
Ry Nohryb
Guest
Posts: n/a
 
      02-14-2011
On Feb 14, 12:01*pm, itay <(E-Mail Removed)> wrote:
> 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.
--
Jorge.
 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      02-15-2011
On Feb 14, 9:01*pm, itay <(E-Mail Removed)> wrote:
> 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


Sounds horrendous. For some idea of how it might turn out, have a play
here:

<URL: http://www.wikispaces.com/content/wiki >

Lots of browser-sniffing + jQuery.

--
Rob


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Book javascritp Vinicius Javascript 2 10-25-2006 06:02 PM
Book javascritp Vinicius Javascript 0 10-25-2006 04:01 PM
HELP :javascritp for checking user noor ASP .Net Web Controls 0 12-24-2005 08:37 AM
javascritp problem... handling special char. =?Utf-8?B?QXNoYQ==?= ASP .Net 1 01-29-2005 11:03 PM
Server-side command included in javascritp inside codebehind?? al ASP .Net 3 07-06-2004 04:31 AM



Advertisments