need help with large data tables

Discussion in 'Javascript' started by toffee, Apr 5, 2007.

  1. toffee

    toffee Guest

    Hi all,

    Here's the situation: I have a simple php file which retrieves data from a
    mysql database and displays it in a table. However, the number of records
    has gotten so large that retrieving all the data takes a lot of memory and
    the browser freezes.

    I been googling for a solution and some1 mentioned something called live
    scrolling where the data is retrieved only when you scroll up or down.
    Since am just an amateur and not familiar with XML, XSL, etc; can any1
    recommend some link where i could find some JS script with such a feature?
    one that's easy to get started with if possible

    I'd also appreciate any other ideas on how to solve the above issue

    thanks

    T
     
    toffee, Apr 5, 2007
    #1
    1. Advertising

  2. toffee

    Ian Collins Guest

    toffee wrote:
    > Hi all,
    >
    > Here's the situation: I have a simple php file which retrieves data from a
    > mysql database and displays it in a table. However, the number of records
    > has gotten so large that retrieving all the data takes a lot of memory and
    > the browser freezes.
    >

    How large? I've (accidentally!) dynamically built a table with several
    thousand lines of 8 columns. Painfully slow in IE, but it loaded.

    > I been googling for a solution and some1 mentioned something called live
    > scrolling where the data is retrieved only when you scroll up or down.
    > Since am just an amateur and not familiar with XML, XSL, etc; can any1
    > recommend some link where i could find some JS script with such a feature?
    > one that's easy to get started with if possible
    >
    > I'd also appreciate any other ideas on how to solve the above issue
    >

    Why not load the data in pages with next/previous buttons? You could
    load data on scroll, but it would look sluggish to the user (think
    panning in google maps).

    --
    Ian Collins.
     
    Ian Collins, Apr 6, 2007
    #2
    1. Advertising

  3. toffee

    töff Guest

    On Apr 5, 4:06 pm, Ian Collins <> wrote:
    > toffee wrote:
    > > Here's the situation ...


    LOL hi toffee this is töff :)

    Do you think the browser freeze is caused not by the size of the
    generated HTML page, but by the fact that all that content is in one
    table? I know when a browser has to load a really large table, it can
    significantly slow down the rendering response time.

    If you don't want to split your big table into pages as Ian suggests
    (that's what I'd probably do), then you might split it into multiple
    tables. Your only challenge would be making the columns line up, and
    some careful td attributes & maybe spacer img's would do the trick.
     
    töff, Apr 6, 2007
    #3
  4. toffee

    Ian Collins Guest

    töff wrote:
    >
    > If you don't want to split your big table into pages as Ian suggests
    > (that's what I'd probably do), then you might split it into multiple
    > tables. Your only challenge would be making the columns line up, and
    > some careful td attributes & maybe spacer img's would do the trick.
    >

    Don't do that (spacer images), even IE's CSS support is good enough to
    get table layout consistent.

    --
    Ian Collins.
     
    Ian Collins, Apr 6, 2007
    #4
  5. toffee

    töff Guest


    > Don't do that (spacer images), even IE's CSS support is good enough to
    > get table layout consistent.


    True enough for IE, but I just solved a serious Firefox display issue
    with an image spacer in a table. It's only a few bytes of img src and
    HTML, no extra download burden.

    But I still like your multipage idea better, Ian.
     
    töff, Apr 6, 2007
    #5
    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. Peter Bassett
    Replies:
    3
    Views:
    930
    Augustus
    Aug 15, 2003
  2. Otuatail

    Tables within tables

    Otuatail, Jul 31, 2004, in forum: HTML
    Replies:
    7
    Views:
    498
  3. Philipp K. Janert, Ph.D.

    Slow loading of large in-memory tables

    Philipp K. Janert, Ph.D., Sep 7, 2004, in forum: Python
    Replies:
    1
    Views:
    411
    Thorsten Kampe
    Sep 15, 2004
  4. Chris Brat
    Replies:
    5
    Views:
    697
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
  5. Replies:
    5
    Views:
    881
    Xho Jingleheimerschmidt
    Apr 2, 2009
Loading...

Share This Page