Large html pages and slow load times/high CPU usage

Peter plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Tue Jun 14 06:00:41 UTC 2005


On Mon, 13 Jun 2005, Madison Kelly wrote:

> Hi all,
>
>  I have problem with my program that I am wondering if a work-around exists 
> for.
>
>  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. I am running the program on the same 
> machine that the browser is running on so bandwidth shouldn't be the issue 
> (it's all via 'localhost:853').
>
>  When I send the output to a text file (the log) instead of the the browser 
> the page "loads" in a few seconds. This should mean then that the code itself 
> is not the source of the bottle neck. 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)? Is it latency somewhere else (TCP/IP)? Any 
> hints/tips would be great!

Make sure your html file has perfect syntax (lint the page using a 
validator) and add the header Connection: close to the server response 
headers.

Peter
--
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