Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Speed consideration

by dws (Chancellor)
on Mar 04, 2003 at 03:12 UTC ( [id://240224]=note: print w/replies, xml ) Need Help??


in reply to Speed consideration

Given that the SSI directives could appear quite a few times in a single document, under heavy traffic loads would it be better to execute a single call that would process an entire HTML page using regular epressions to insert the affiliate code in all the right places or to go ahead and let the simple insertion script be run multiple times per page load?

There's a third option that's close in spirit to your first choice: Instead of using regular expressions to rewrite the HTML, usage a templating mechanism (e.g., HTML::Template).

Your second scheme starts a process per SSI insertion. Under load, this'll kill you.

Don't be concerned that the page you're building is 40K or so. That's peanuts compared with the overhead launching several process.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://240224]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-23 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found