talarubi: (16-bit dracus)
[personal profile] talarubi
So I was poking around, grumping at the navigation, and wondered if I could print parts of the PHP manual. Hmm, I thought. Just how big is the thing? I grab the single-file HTML version, 10MB. Load in Firefox. Rattle talons.

Hmmmmm. FF's memusage shoots up at least 150mb. Bad sign. Print preview must be trying to use that much MORE, and thrashes so bad that it's allocating memory at modem speeds. It wasn't really going to finish. (Ed: It may have actually been a CPU issue, or even FF's allocator choking, I don't remember seeing a lot of disk activity... but that's anyone's guess.)

IE for once fares better, capping around 180mb--which is to say it actually finished. But for every page it seems to be touching all previous pages (disabling headers/footers speeds it up), leading to some alarming O(kn) runtimes! With the smallest font size and minimal margins, the manual, without annotations, comes to 2858 pages. The preview took about a half hour... by the end it had slowed to a >1sec/page crawl. o..o

Well so much for that idea. :) Things like this are an interesting comment on code scalability... a mere 10mb file becomes a problem when you use so much memory per tag that the internal representation is 15..20x larger. Since most of the document is plain text one must assume the tags are using hundreds of bytes, not 4chars*(15..20)=60..80! (While such files are unwieldy to be sure, I've wanted to edit them on occasion and found even Wordpad et al to have similar problems.)
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

talarubi: (Default)
Talarubi

January 2007

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031   

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 11th, 2025 03:18 pm
Powered by Dreamwidth Studios