maximum rows added to table

Discussion in 'Javascript' started by enrique, May 2, 2008.

  1. enrique

    enrique Guest

    Does anyone know what the upper limit is to the number of rows you can
    dynamically add to an HTML table, using Javascript? I tried to make a
    table consisting of over 74,000 rows and Firefox stops rendering the
    page. I didn't notice any exceptions being thrown or any other
    external indicator that something is wrong, other than the page not
    being rendered all the way.

    If you happen to know if there is a number to this I should be aware
    of, please respond :)

    Thanks.
     
    enrique, May 2, 2008
    #1
    1. Advertising

  2. enrique

    Evertjan. Guest

    enrique wrote on 02 mei 2008 in comp.lang.javascript:

    > Does anyone know what the upper limit is to the number of rows you can
    > dynamically add to an HTML table, using Javascript? I tried to make a
    > table consisting of over 74,000 rows and Firefox stops rendering the
    > page. I didn't notice any exceptions being thrown or any other
    > external indicator that something is wrong, other than the page not
    > being rendered all the way.
    >
    > If you happen to know if there is a number to this I should be aware
    > of, please respond :)


    The language has no limit, The DOM, as implemented in different browsers,
    might have, but the DOM is not part of Javascript. So the answer in general
    is unanswerable, for a specific browser, there might be a limit.

    I suppose the limit depends on the maximum memory set available for that
    purpose.

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

    Using a html table of 74,000 rows in a browser is nonsensical in itself.

    That is not where browser were made for. Other technologies are much more
    appropriate for displaying such number, be it that the visual use and the
    scrollability is null.

    Perhaps you plan to make a 3000 page book using a browser?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., May 2, 2008
    #2
    1. Advertising

  3. enrique wrote:
    > Does anyone know what the upper limit is to the number of rows you can
    > dynamically add to an HTML table, using Javascript? I tried to make a
    > table consisting of over 74,000 rows and Firefox stops rendering the
    > page. I didn't notice any exceptions being thrown or any other
    > external indicator that something is wrong, other than the page not
    > being rendered all the way.
    >
    > If you happen to know if there is a number to this I should be aware
    > of, please respond :)


    I don't know of any specified limit. However, there is a practical limit of
    course, both regarding memory size and usability. If you don't recognize by
    yourself that a table with more than, say, 2000 rows is unusable, you are
    really beyond help.


    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
     
    Thomas 'PointedEars' Lahn, May 2, 2008
    #3
  4. enrique

    enrique Guest

    On May 2, 2:49 pm, Thomas 'PointedEars' Lahn <>
    wrote:
    >If you don't recognize by
    > yourself that a table with more than, say, 2000 rows is unusable, you are
    > really beyond help.


    Guys, PLEASE let's keep the discussion friendly.

    I didn't intend to debate why I would want to display 74,000 rows in a
    single table. It's not important for the purposes of this question.
    I'm asking if there is a known limitation with the DOM's ability to
    dynamically add rows to an HTML table (as if I needed to restate the
    question.)

    If you care to discuss the aesthetics about web page readability and
    usability, feel free to start a new thread in the appropriate
    discussion group.

    Thank you.
     
    enrique, May 3, 2008
    #4
  5. enrique wrote:
    > [...] Thomas 'PointedEars' Lahn [...] wrote:
    >> If you don't recognize by yourself that a table with more than, say,
    >> 2000 rows is unusable, you are really beyond help.

    >
    > Guys, PLEASE let's keep the discussion friendly.


    This *was* a friendly reminder that what you are doing is considered
    nonsense actually, and so your question as it is really does not matter even
    if somebody knew the answer (it cannot be known for sure, as not all DOMs
    are open source). As I have pointed out, chances are that you are merely
    running into a memory limit which may differ between user agents, operating
    systems, and platforms.

    > I didn't intend to debate why I would want to display 74,000 rows in a
    > single table. It's not important for the purposes of this question. I'm
    > asking if there is a known limitation with the DOM's ability to
    > dynamically add rows to an HTML table (as if I needed to restate the
    > question.)


    As indicated by your trimming the quotation too much, you missed the point.

    > If you care to discuss the aesthetics about web page readability and
    > usability, feel free to start a new thread in the appropriate discussion
    > group.


    This is Usenet, not your private support forum. You are not to dictate
    what is discussed and how it is discussed in a thread that you started.
    Like it or leave it.


    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
     
    Thomas 'PointedEars' Lahn, May 3, 2008
    #5
  6. In comp.lang.javascript message <>, Sat,
    3 May 2008 23:07:41, Thomas 'PointedEars' Lahn <>
    posted:
    >
    >This *was* a friendly reminder


    If you expect your approach to communication to be seen as friendly be
    normal readers, then you are both naive and a slow learner.

    --
    (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
    Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
    Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
    Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
     
    Dr J R Stockton, May 4, 2008
    #6
  7. Thomas 'PointedEars' Lahn a écrit :
    > enrique wrote:
    >> [...] Thomas 'PointedEars' Lahn [...] wrote:
    >>> If you don't recognize by yourself that a table with more than, say,
    >>> 2000 rows is unusable, you are really beyond help.

    >> Guys, PLEASE let's keep the discussion friendly.

    >
    > This *was* a friendly reminder


    Of course it was *NOT*

    --
    laurent
     
    Laurent vilday, May 5, 2008
    #7
  8. enrique

    Jorge Guest

    On May 2, 7:37 pm, enrique <> wrote:
    > Does anyone know what the upper limit is to the number of rows you can
    > dynamically add to an HTML table, using Javascript? I tried to make a
    > table consisting of over 74,000 rows and Firefox stops rendering the
    > page.  I didn't notice any exceptions being thrown or any other
    > external indicator that something is wrong, other than the page not
    > being rendered all the way.
    >
    > If you happen to know if there is a number to this I should be aware
    > of, please respond :)
    >
    > Thanks.


    Safari on a Mac : more than 200k rows : it rocks.
    FF2 on a Mac : sluggish @ ~70k rows.
    Opera on a Mac : sluggish ~from the start.
    Safari windows : ok up to 100k rows then stops responding.
    IE8b Windozes : sluggish @ ~6k rows : it sucks.
    FF2 Windows : sluggish @ ~70k rows.

    click into the window to stop / continue adding rows :

    HTH,
    --Jorge.

    <html>
    <head>
    <meta name="author" content="jorge">
    <!-- Date: 2008-05-05 -->

    <!--567890123456789012345678901234567890123456789012345678901234567890
    -->
    <script>
    window.go = true;
    window.onclick = function () { window.go = !window.go; };
    window.onload = function () {
    var table = document.createElement("table");
    document.body.appendChild(table);
    table.next=1;
    (function () {
    var row, cell, i, me = arguments.callee;
    if (window.go) {
    for (i=0; i<100; i++) {
    cell = document.createElement("td");
    (cell).innerHTML = "row # "+ (table.next++);
    (row = document.createElement("tr")).appendChild(cell);
    table.insertBefore(row, table.firstChild);
    }
    }
    setTimeout(me, 5);
    })();
    };
    </script>

    </head>
    <body>
    </body>
    </html>
     
    Jorge, May 5, 2008
    #8
  9. enrique

    enrique Guest

    On May 5, 8:41 am, Jorge <> wrote:
    > On May 2, 7:37 pm, enrique <> wrote:
    >
    > > Does anyone know what the upper limit is to the number of rows you can
    > > dynamically add to an HTML table, using Javascript? I tried to make a
    > > table consisting of over 74,000 rows and Firefox stops rendering the
    > > page. I didn't notice any exceptions being thrown or any other
    > > external indicator that something is wrong, other than the page not
    > > being rendered all the way.

    >
    > > If you happen to know if there is a number to this I should be aware
    > > of, please respond :)

    >
    > > Thanks.

    >
    > Safari on a Mac : more than 200k rows : it rocks.
    > FF2 on a Mac : sluggish @ ~70k rows.
    > Opera on a Mac : sluggish ~from the start.
    > Safari windows : ok up to 100k rows then stops responding.
    > IE8b Windozes : sluggish @ ~6k rows : it sucks.
    > FF2 Windows : sluggish @ ~70k rows.
    >
    > click into the window to stop / continue adding rows :
    >
    > HTH,
    > --Jorge.
    >
    > <html>
    > <head>
    > <meta name="author" content="jorge">
    > <!-- Date: 2008-05-05 -->
    >
    > <!--567890123456789012345678901234567890123456789012345678901234567890
    > -->
    > <script>
    > window.go = true;
    > window.onclick = function () { window.go = !window.go; };
    > window.onload = function () {
    > var table = document.createElement("table");
    > document.body.appendChild(table);
    > table.next=1;
    > (function () {
    > var row, cell, i, me = arguments.callee;
    > if (window.go) {
    > for (i=0; i<100; i++) {
    > cell = document.createElement("td");
    > (cell).innerHTML = "row # "+ (table.next++);
    > (row = document.createElement("tr")).appendChild(cell);
    > table.insertBefore(row, table.firstChild);
    > }
    > }
    > setTimeout(me, 5);
    > })();
    > };
    > </script>
    >
    > </head>
    > <body>
    > </body>
    > </html>


    Very interesting results! Thanks for sharing.
     
    enrique, May 6, 2008
    #9
  10. Jorge wrote:
    > On May 2, 7:37 pm, enrique <> wrote:
    >> Does anyone know what the upper limit is to the number of rows you can
    >> dynamically add to an HTML table, using Javascript? I tried to make a
    >> table consisting of over 74,000 rows and Firefox stops rendering the
    >> page. I didn't notice any exceptions being thrown or any other
    >> external indicator that something is wrong, other than the page not
    >> being rendered all the way.
    >>
    >> If you happen to know if there is a number to this I should be aware
    >> of, please respond :)
    >> [...]

    >
    > Safari on a Mac : more than 200k rows : it rocks.
    > FF2 on a Mac : sluggish @ ~70k rows.
    > Opera on a Mac : sluggish ~from the start.
    > Safari windows : ok up to 100k rows then stops responding.
    > IE8b Windozes : sluggish @ ~6k rows : it sucks.
    > FF2 Windows : sluggish @ ~70k rows.


    Unsurprisingly, your results could not be less representative, for what you
    observed heavily depends on the hardware and software used, platform and
    operating system very much aside. Hence my first reply.


    PointedEars
    --
    var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
    ) // Plone, register_function.js:16
     
    Thomas 'PointedEars' Lahn, May 6, 2008
    #10
  11. enrique

    Jorge Guest

    On May 6, 8:37 pm, Thomas 'PointedEars' Lahn <>
    wrote:

    > Unsurprisingly, your results could not be less representative, for what you
    > observed heavily depends on the hardware and software used, platform and
    > operating system very much aside.  Hence my first reply.
    >


    Well, that's so for any test of any program... e.g. M$ Excel ?

    --Jorge. (bottom-posting :)
     
    Jorge, May 6, 2008
    #11
  12. enrique

    Jorge Guest

    On May 6, 8:37 pm, Thomas 'PointedEars' Lahn <>
    wrote:

    > var bugRiddenCrashPronePieceOfJunk = (
    >     navigator.userAgent.indexOf('MSIE 5') != -1
    >     && navigator.userAgent.indexOf('Mac') != -1
    > )  // Plone, register_function.js:16


    function its (p) { return (navigator.userAgent.indexOf(p) != -1) };
    if (its('MSIE') && its('Windows')) {
    try { run() } catch (e) { get_a_Mac() }
    }

    --Jorge.
     
    Jorge, May 6, 2008
    #12
  13. Jorge wrote:
    > [...] Thomas 'PointedEars' Lahn [...] wrote:
    >> Unsurprisingly, your results could not be less representative, for what you
    >> observed heavily depends on the hardware and software used, platform and
    >> operating system very much aside. Hence my first reply.

    >
    > Well, that's so for any test of any program... e.g. M$ Excel ?


    A test of even standing the chance of being representative would not only
    include a much greater variety of platforms, user agents and operating
    systems, but also a great variety of hardware and software configurations
    (for example, a sub-test with resource killing applications like Microsoft
    Office running and one, under otherwise the same conditions, with such an
    application not running).

    Since it would be much too expensive, and ultimately futile to set up such a
    test (because the results would be obsolete the day, maybe the hour, after)
    just to satisfy the OP's curiosity, it should suffice to say that tables
    should not have that many rows. Which is an opinion that can merely be
    formed by applying common sense to this problem.


    PointedEars
    --
    Use any version of Microsoft Frontpage to create your site.
    (This won't prevent people from viewing your source, but no one
    will want to steal it.)
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm>
     
    Thomas 'PointedEars' Lahn, May 6, 2008
    #13
    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. Subba Rao via DotNetMonster.com

    script for moving rows up and down and traverse thru rows of HTML table

    Subba Rao via DotNetMonster.com, Mar 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    8,243
    Subba Rao via DotNetMonster.com
    Mar 19, 2005
  2. Rio
    Replies:
    4
    Views:
    1,202
  3. =?Utf-8?B?QmFkaXM=?=

    GridView Maximum Rows

    =?Utf-8?B?QmFkaXM=?=, Nov 2, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    953
    =?Utf-8?B?QmFkaXM=?=
    Nov 2, 2006
  4. Kagu
    Replies:
    0
    Views:
    441
  5. phanhuyich
    Replies:
    4
    Views:
    280
Loading...

Share This Page