in reply to Opening too many files?
One simple technique is to cache the pages (or parts of the pages): as you're assembling the page the first time write it to a file or some other storage then send it out. On subsequent fetches of the same page, check to see how old the cached version is and if it's significantly old enough (fudge, fudge) rebuild it otherwise just chuck out the text in the cache.
You can keep this pretty lightweight if you remember to check the cache *before* you drag in all of the modules (incl. CGI, HTML::*, etc..). Then your overhead is simply the fork, exec of perl, and script compilation.
This is just a first approximation at scaling. In fact, you don't really have to do much at all to make this happen to existing scripts if they're written with this in mind.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re(2): Opening too many files?
by FoxtrotUniform (Prior) on Jan 29, 2002 at 00:59 UTC | |
by clintp (Curate) on Jan 29, 2002 at 04:28 UTC |