Large html pages and slow load times/high CPU usage
Henry Spencer
henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Mon Jun 13 21:32:40 UTC 2005
On Mon, 13 Jun 2005, Madison Kelly wrote:
> I am stress-testing my backup program now and I've noticed that with
> a sample partition with ~26,000 directories when they are all set to be
> displayed it creates a ~1.5MB html file... When I send the
> output to the browser though Mozilla jumps to 100% CPU usage and it take
> a very long time (minutes) to load the same data.
> Is the browser taking time because of the render time (each directory
> creates a cell in a table)?
Rendering of huge tables is almost always slow, especially if the machine
doesn't have piles of memory. It's typically necessary for the browser to
build up a data structure representing the *entire* table before it can
decide how wide columns should be etc. This takes a long time and a very
large amount of memory (the representation is often quite inefficient),
and especially if that's driving your machine into paging/swapping, it's
not too surprising that it's slow.
If you can find some way of breaking that table up into smaller ones, or
using something simpler than a table, odds are you'll see a major
improvement.
Henry Spencer
henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list