need help with large data tables

T

toffee

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
 
I

Ian Collins

toffee said:
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).
 
T

töff

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.
 
I

Ian Collins

töff said:
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.
 
T

töff

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top