Javascript Memory Limitations

Discussion in 'Javascript' started by MC, Aug 14, 2010.

  1. MC

    MC Guest

    Hi,

    I was wondering if anyone had any data on the limitations of the current
    browsers, specifically IE8, IE9 FF 3.5+, and Chrome. I am building a large
    javascript browser application handling a lot of data and multiple pages and
    just wondering if I'm going to have problems.

    Thanks,
    Mica
     
    MC, Aug 14, 2010
    #1
    1. Advertising

  2. MC

    David Mark Guest

    On Aug 14, 4:13 pm, "MC" <mica[removethis]@aisus.com> wrote:
    > Hi,
    >
    > I was wondering if anyone had any data on the limitations of the current
    > browsers, specifically IE8, IE9 FF 3.5+, and Chrome.


    What sort of (memory) limitations?

    > I am building a large
    > javascript browser application handling a lot of data and multiple pages and
    > just wondering if I'm going to have problems.
    >


    The Magic 8-ball says: signs point to yes.
     
    David Mark, Aug 14, 2010
    #2
    1. Advertising

  3. MC

    Evertjan. Guest

    MC wrote on 14 aug 2010 in comp.lang.javascript:

    > I was wondering if anyone had any data on the limitations of the
    > current browsers, specifically IE8, IE9 FF 3.5+, and Chrome. I am
    > building a large javascript browser application handling a lot of data
    > and multiple pages and just wondering if I'm going to have problems.


    All memory will be confined to a per page maximum, if my memory serves me
    correctly.

    You will get problems with such large undertakings especially cross-browser
    ones.

    Why not keep the lunb of the data on the server and use serveride
    databases?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 15, 2010
    #3
  4. MC

    MC Guest

    "Evertjan." <> wrote in message
    news:Xns9DD5B8BC28CC0eejj99@194.109.133.242...
    > MC wrote on 14 aug 2010 in comp.lang.javascript:
    >
    >> I was wondering if anyone had any data on the limitations of the
    >> current browsers, specifically IE8, IE9 FF 3.5+, and Chrome. I am
    >> building a large javascript browser application handling a lot of data
    >> and multiple pages and just wondering if I'm going to have problems.

    >
    > All memory will be confined to a per page maximum, if my memory serves me
    > correctly.
    >
    > You will get problems with such large undertakings especially
    > cross-browser
    > ones.
    >
    > Why not keep the lunb of the data on the server and use serveride
    > databases?
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)


    So no one has any hard data on any of the browsers.
    I really don't want to discuss the why and go into that rabbit hole. Suffice
    it to say that letting the browser handle the data can significantly
    increase the speed at which users are able to use our software.
     
    MC, Aug 17, 2010
    #4
  5. On Aug 14, 3:13 pm, "MC" <mica[removethis]@aisus.com> wrote:

    > I was wondering if anyone had any data on the limitations of the current
    > browsers, specifically IE8, IE9 FF 3.5+, and Chrome. I am building a large
    > javascript browser application handling a lot of data and multiple pages and
    > just wondering if I'm going to have problems.


    On Aug 17, 8:54 am, "MC" <mica[removethis]@aisus.com> wrote:

    > So no one has any hard data on any of the browsers.
    > I really don't want to discuss the why and go into that rabbit hole. Suffice
    > it to say that letting the browser handle the data can significantly
    > increase the speed at which users are able to use our software.


    Your question is too vague to give you an appropriate answer. As it
    stands the answer is "yes and no" depending on what you're trying to
    accomplish and how you go about it. What is "a lot of data"? 1 MB? 1
    GB? Textual data? Binary? How much communication between the server
    client is there? etc....
     
    Michael Haufe (\TNO\), Aug 17, 2010
    #5
  6. MC

    MC Guest

    "Michael Haufe ("TNO")" <> wrote in message
    news:...
    On Aug 14, 3:13 pm, "MC" <mica[removethis]@aisus.com> wrote:

    > I was wondering if anyone had any data on the limitations of the current
    > browsers, specifically IE8, IE9 FF 3.5+, and Chrome. I am building a large
    > javascript browser application handling a lot of data and multiple pages
    > and
    > just wondering if I'm going to have problems.


    On Aug 17, 8:54 am, "MC" <mica[removethis]@aisus.com> wrote:

    > So no one has any hard data on any of the browsers.
    > I really don't want to discuss the why and go into that rabbit hole.
    > Suffice
    > it to say that letting the browser handle the data can significantly
    > increase the speed at which users are able to use our software.


    >Your question is too vague to give you an appropriate answer. As it
    >stands the answer is "yes and no" depending on what you're trying to
    >accomplish and how you go about it. What is "a lot of data"? 1 MB? 1
    >GB? Textual data? Binary? How much communication between the server
    >client is there? etc....


    I am looking for information such as:
    Is there a set max memory for a browser or the parser?
    Is there a way to test to see if how much utilization is done?
    Does memory depend on the browser computer as opposed to some set limit?

    We are looking at a browser holding about .15mb data text,
    and a single page size of around 20,000 lines of html and javascript.
    There are about 20 forms in the page and an ajax update of the server is
    done
    every time the user leaves one form and goes to the next.
     
    MC, Aug 17, 2010
    #6
  7. MC

    Evertjan. Guest

    MC wrote on 17 aug 2010 in comp.lang.javascript:

    >
    > "Evertjan." <> wrote in message

    [..]
    >> Why not keep the lumb of the data on the server and use serveride
    >> databases?


    [please do not quote signatures on usenet]

    > So no one has any hard data on any of the browsers.


    What do you mean by "hard data"? Data is data, meseems.

    Do you mean persistent data between pages or sessions?

    Present day browsers only have cookies for such use, as identifiers of old
    and present sessions and some other data, or perhaps querystring data.

    > I really don't want to discuss the why and go into that rabbit hole.


    This is usenet. You cannot limit the response to your postings.
    What do you have against rabbits exor their holes, btw?

    > Suffice it to say that letting the browser handle the data can
    > significantly increase the speed at which users are able to use our
    > software.


    No that does not suffice, as there are far more important issues, like
    security, cross browser reliability.

    Subjective user speed can be an buying incentive, but that will be cheating
    your customer if you degrade security and reliability for that.

    Do you really think your web-pages will work correcly on most of the
    browsers on an Andriod, Symbian, or Windows Mobile platform, or a text-only
    browser like Lynx?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 17, 2010
    #7
  8. On Aug 17, 1:02 pm, "MC" <mica[removethis]@aisus.com> wrote:

    > I am looking for information such as:
    > Is there a set max memory for a browser or the parser?


    There is no practical limit per se for the browsers you've mentioned,
    though depending on how your code is written, and the age of the
    client machine, things could well indeed become unusable.

    > Is there a way to test to see if how much utilization is done?
    > Does memory depend on the browser computer as opposed to some set limit?


    I would say don't worry about this level of detail at this stage. In
    Firefox at least you can type about:memory in the address bar to get a
    generic overview of memory use.


    > We are looking at a browser holding about .15mb data text,


    I assume you meant 15 MB and not 150kb.

    > and a single page size of around 20,000 lines of html and javascript.
    > There are about 20 forms in the page and an ajax update of the server is
    > done
    > every time the user leaves one form and goes to the next.


    Why would you need 15MB of data on every page to fill out a small
    number of forms? Since you'll already have a back and forth channel to
    the server, could you not load the relevant data on demand?

    This data can be stored on the client outside of RAM if necessary, but
    I'm curious to what the necessity is to have it all available at once
    anyway instead of loading bit s of it at a time as the relevant forms
    are needed.
     
    Michael Haufe (\TNO\), Aug 18, 2010
    #8
  9. On Aug 17, 4:01 pm, "Evertjan." <> wrote:

    > Do you really think your web-pages will work correcly on most of the
    > browsers on an Andriod, Symbian, or Windows Mobile platform, or a text-only
    > browser like Lynx?



    Probably not as the OP did not mention any concern about the browsers
    not mentioned in his/her list.
     
    Michael Haufe (\TNO\), Aug 18, 2010
    #9
  10. MC

    MC Guest

    "Michael Haufe ("TNO")" <> wrote in message
    news:...
    On Aug 17, 4:01 pm, "Evertjan." <> wrote:

    > Do you really think your web-pages will work correcly on most of the
    > browsers on an Andriod, Symbian, or Windows Mobile platform, or a
    > text-only
    > browser like Lynx?



    Probably not as the OP did not mention any concern about the browsers
    not mentioned in his/her list.

    ---------
    Correct. This is a business application and we already know what our user
    base is using and we can set minimum configurations.
     
    MC, Aug 18, 2010
    #10
  11. MC

    MC Guest

    "Michael Haufe ("TNO")" <> wrote in message
    news:...
    On Aug 17, 1:02 pm, "MC" <mica[removethis]@aisus.com> wrote:

    > I am looking for information such as:
    > Is there a set max memory for a browser or the parser?


    There is no practical limit per se for the browsers you've mentioned,
    though depending on how your code is written, and the age of the
    client machine, things could well indeed become unusable.

    > Is there a way to test to see if how much utilization is done?
    > Does memory depend on the browser computer as opposed to some set limit?


    I would say don't worry about this level of detail at this stage. In
    Firefox at least you can type about:memory in the address bar to get a
    generic overview of memory use.


    > We are looking at a browser holding about .15mb data text,


    I assume you meant 15 MB and not 150kb.

    > and a single page size of around 20,000 lines of html and javascript.
    > There are about 20 forms in the page and an ajax update of the server is
    > done
    > every time the user leaves one form and goes to the next.


    Why would you need 15MB of data on every page to fill out a small
    number of forms? Since you'll already have a back and forth channel to
    the server, could you not load the relevant data on demand?

    This data can be stored on the client outside of RAM if necessary, but
    I'm curious to what the necessity is to have it all available at once
    anyway instead of loading bit s of it at a time as the relevant forms
    are needed.

    ----------------
    Actually, the size of the data is .15mb or 150kb. What we are doing is
    necessary or else we would need to hold most of the data in session on the
    server and do a lot of manipulation and page refreshes. The data is required
    accross the set of forms for what we are doing and it and the forms are
    dynamic. So we may have a location section, dynamically add/delete more
    locations, which will cause sections on other forms to automatically change.
    The html code actually will change along with the data.

    A competitors normal business case scenario can take upwards of one hour to
    fill over the web using single form pages and caching data on the server. We
    are seeing times of around 30 minutes or less and the users really like it
    which means they are much more likely to use it.
     
    MC, Aug 18, 2010
    #11
  12. MC

    MC Guest

    "Stefan Weiss" <> wrote in message
    news:...
    > On 18/08/10 02:46, MC wrote:
    >> "Michael Haufe ("TNO")" <> wrote in message
    >> news:...
    >> On Aug 17, 4:01 pm, "Evertjan." <> wrote:
    >>
    >>> Do you really think your web-pages will work correcly on most of the
    >>> browsers on an Andriod, Symbian, or Windows Mobile platform, or a
    >>> text-only
    >>> browser like Lynx?

    >>
    >>
    >> Probably not as the OP did not mention any concern about the browsers
    >> not mentioned in his/her list.
    >>
    >> ---------
    >> Correct. This is a business application and we already know what our user
    >> base is using and we can set minimum configurations.

    >
    > And do you know which operating systems your user base is running, and
    > how their browsers are set up?
    > The point is that there's no such thing as "hard data" about maximum
    > memory usage in a browser. It all depends on your users' setup. I've
    > seen browsers use all available memory and then start to fill the swap
    > space (aka page file), consuming gigabytes or memory, I've seen browsers
    > return "out of memory" errors for much less, and I've seen browsers
    > "vanishing" abruptly because the process was killed by the OS due to
    > excessive memory usage. Some systems need to be more strict about
    > runaway processes than others (for example, mobile platforms or
    > servers). As far as I can tell, there is no single answer to your
    > question - there are too many variables. However, if the number you
    > quoted before is accurate (150KB or even 15MB), you should be fine in
    > most any environment. That's not even close to what some other current
    > apps (and some exotic libraries) require from browsers.
    >
    > How did you calculate the prospective memory usage? I'm honestly
    > curious, because I wouldn't know how to do that (apart from measuring).
    > If you're talking about 150k of raw data stored in JS strings, the
    > actual memory usage is going to be quite a bit higher (more if there are
    > many small strings, less if there's one 150k string). If the data is
    > contained in HTML elements in the document itself, the resourse usage is
    > going to be even heavier. In any case, 150k should not present much of a
    > problem for a typical client.
    >
    > You said it was a business application. In that case, odds are that at
    > least some of your users will be running MSIE browsers, and you should
    > be aware that Internet Explorer (especially the older versions) is
    > notorious for its memory leaks. Search at the group archive for
    > suggestions about how avoid these. In my experience, IE can also slow
    > down to a crawl on "heavy" pages (many DOM elements, large arrays, etc).
    >
    > HTH
    >
    >
    > --
    > stefan


    Stefan,

    Most of the data will be in the data model AND in the html elements. We are
    able to measure the size of the json objects being sent and retrieved on the
    server. I realize this is only an approximation of how the browser is
    handling it. I'm really more concerned about the number of lines of html/js
    and the number of forms as far as limitations go.

    We have already established a minimum criteria of IE8+, FF 3.5+ and Chrome
    5+. Since this is a business application, we can expect our users to comply.
    We already track our users browser data in our login database and can deal
    with this issue comfortably. (It already breaks IE7)

    Thank you,
    Mica
     
    MC, Aug 18, 2010
    #12
  13. On Aug 17, 8:05 pm, "MC" <mica[removethis]@aisus.com> wrote:

    > Actually, the size of the data is .15mb or 150kb. What we are doing is
    > necessary or else we would need to hold most of the data in session on the
    > server and do a lot of manipulation and page refreshes. The data is required
    > accross the set of forms for what we are doing and it and the forms are
    > dynamic. So we may have a location section, dynamically add/delete more
    > locations, which will cause sections on other forms to automatically change.
    > The html code actually will change along with the data.
    >
    > A competitors normal business case scenario can take upwards of one hour to
    > fill over the web using single form pages and caching data on the server.We
    > are seeing times of around 30 minutes or less and the users really like it
    > which means they are much more likely to use it.



    Please keep the proper level of quote nesting.

    With just 150kb of data, I have a hard time picturing why it should
    take 30 mins to render what seems like a straightforward CRUD
    application. Is this 150kb transferred on every page? Or is it sent
    all at once? Perhaps I'm just not understanding the scope. Where is
    this time bottleneck at? Rendering, communication, DB queries/updates?
     
    Michael Haufe (\TNO\), Aug 18, 2010
    #13
  14. In comp.lang.javascript message <7585a$4c6aceb6$4b582b28$
    T>, Tue, 17 Aug 2010 13:02:20, MC <mica@[removethis].invalid> posted:

    >
    >We are looking at a browser holding about .15mb data text,


    In <URL:http://www.merlyn.demon.co.uk/js-misc0.htm#MLS>, button "Wombat"
    will create 12345678 repeats of "+" in a string in about 0.1 second
    using FF 3.0.19 in WinXP sp3 on P4/3GHz with 1GB RAM. You should have
    no problem with the minute fraction of one bit of data that you asked
    about, or even with the 0.15MB that you probably intended.

    Going to 123456789 took about half a minute, and made parts of the
    machine slow thereafter, doubtless due to having 246,913,578 bytes of
    string in use.

    I expect the practical limit to depend on the OS, the amount of RAM, and
    whether anything much else is loaded or working at the same time; ICBW.

    --
    (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
    Web <URL:http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links;
    Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc.
    No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
     
    Dr J R Stockton, Aug 18, 2010
    #14
  15. MC

    Evertjan. Guest

    Hans-Georg Michna wrote on 20 aug 2010 in comp.lang.javascript:

    > On Tue, 17 Aug 2010 13:02:20 -0500, "MC"
    > <mica[removethis]@aisus.com> wrote:
    >
    >>We are looking at a browser holding about .15mb data text,
    >>and a single page size of around 20,000 lines of html and javascript.
    >>There are about 20 forms in the page and an ajax update of the server is
    >>done every time the user leaves one form and goes to the next.

    >
    > In my experience you will not have any space problems with that.
    > I have written a fun application, http://winhlp.com/telly/ ,
    > that loads 12 MB of JSON data, and I never ran into any space
    > problems.
    >
    > There may be two other problems though. One is that the browsers
    > appear to use memory very inefficiently, meaning that they may
    > use up to 100 bytes for every actual byte you load.
    >
    > The other is that your program may be slow when handling larger
    > amounts of memory.
    >
    > Ultimately I think you should just try it and test it on as many
    > browsers as possible.


    I yet fail to see any advantages of doing such things clientside,
    while there are these many disadvantages I talked about.

    The user cannot really need 12Mb in its machine-user interface.

    So why not do this serverside?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 20, 2010
    #15
  16. In comp.lang.javascript message <9dlt66p9n2dmlqud7eujp2nsh06pi77smh@4ax.
    com>, Fri, 20 Aug 2010 22:07:00, Hans-Georg Michna <hans-
    > posted:

    >The other is that your program may be slow when handling larger
    >amounts of memory.
    >
    >Ultimately I think you should just try it and test it on as many
    >browsers as possible.


    As many browsers, and also on slow machines with limited RAM and slow
    discs, to the extent that the target readership is likely to need to use
    such.

    --
    (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
    Web <URL:http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links;
    Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc.
    No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
     
    Dr J R Stockton, Aug 21, 2010
    #16
  17. MC

    Evertjan. Guest

    Hans-Georg Michna wrote on 21 aug 2010 in comp.lang.javascript:

    >>I yet fail to see any advantages of doing such things clientside,
    >>while there are these many disadvantages I talked about.
    >>
    >>The user cannot really need 12Mb in its machine-user interface.
    >>
    >>So why not do this serverside?

    >
    > First of all, this was just a fun project. I wanted to see how
    > far one could go with driving JavaScript to its limits. What I
    > found is that, with some little tricks, it goes pretty far.


    Sure, however my comment was not about your programme, but about the OP's
    intentions.


    > The other point is that a program like Telly is
    > computation-intensive. If it is done client-side, tens, even
    > hundreds of thousands of users could use it simultaneously. (Not
    > that Telly will ever get used that much. :) Once the program
    > and the data is downloaded and cached, the server can idle and
    > server other users.
    >
    > Do the same on the server, and it will break down even with a
    > few hundred or thousand simultaneous users.


    Good point, I did not think of that.

    Sort of distributed computing.
    Perhaps we could do more nice things that way.

    ================

    However, in the case of the OP, who is Ajaxing 2.5 MB on every form,
    this would not apply, since the Ajaxing would have the same effect with a
    few thousand simultaneous users.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 21, 2010
    #17
    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. Saqib Ali

    SOAP:Lite Limitations re: https??

    Saqib Ali, Sep 12, 2003, in forum: Perl
    Replies:
    1
    Views:
    3,034
    Serge Dubrouski
    Sep 16, 2003
  2. 123
    Replies:
    0
    Views:
    338
  3. AS
    Replies:
    1
    Views:
    892
    andrewmcdonagh
    Oct 28, 2006
  4. Bart Van der Donck

    Memory: measuring 5 limitations

    Bart Van der Donck, Dec 10, 2003, in forum: Perl Misc
    Replies:
    6
    Views:
    213
    Bart Van der Donck
    Dec 12, 2003
  5. Chris Hamel

    Memory Limitations for Perl Programs?

    Chris Hamel, Sep 5, 2006, in forum: Perl Misc
    Replies:
    6
    Views:
    137
    Steven N. Hirsch
    Sep 8, 2006
Loading...

Share This Page