javascritp RIA and browser memory

Discussion in 'Javascript' started by itay, Feb 14, 2011.

  1. itay

    itay Guest

    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!
    itay, Feb 14, 2011
    #1
    1. Advertising

  2. itay

    Ry Nohryb Guest

    On Feb 14, 12:01 pm, itay <> 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.
    Ry Nohryb, Feb 14, 2011
    #2
    1. Advertising

  3. itay

    RobG Guest

    On Feb 14, 9:01 pm, itay <> 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
    RobG, Feb 15, 2011
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. al
    Replies:
    3
    Views:
    1,753
  2. =?Utf-8?B?QXNoYQ==?=

    javascritp problem... handling special char.

    =?Utf-8?B?QXNoYQ==?=, Jan 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    324
    Ken Cox [Microsoft MVP]
    Jan 29, 2005
  3. noor

    HELP :javascritp for checking user

    noor, Dec 24, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    91
  4. Vinicius

    Book javascritp

    Vinicius, Oct 25, 2006, in forum: Javascript
    Replies:
    2
    Views:
    81
    Peter Michaux
    Oct 25, 2006
  5. Vinicius

    Book javascritp

    Vinicius, Oct 25, 2006, in forum: Javascript
    Replies:
    0
    Views:
    89
    Vinicius
    Oct 25, 2006
Loading...

Share This Page