To answer my own question, I landed up doing the following:

if {[string match *.html $file]} {
  set script [file join [file dirname $file] htmlhandler.ws3]
  web::interpclasscfg $script maxrequests 10
  return $script
}

Not sure what impact that might have on memory (separate interpclass structures per file?) but it does what I want for the time being in terms of quicker startup.

/Ashok

Ashok P. Nadkarni wrote:
I'm playing around with using namespaces and slaves to reduce the time to deliver a web page by making the interpreter handle multiple requests. The websh.conf file has the lines

   # individual scripts (each with its own interpreters)
   if {[string match *.ws3 $file]} {
   return $file
   }

in the web::interpmap command. The question is, not how do I write the corresponding web::interpclasscfg command to change maxrequests to (say) 10 ? interpmap takes the class name as a parameter but since that changes on a per file basis, how do I change it? The ws3 files may lie in different directories so I don't want to hardcode or enumerate full paths if possible.

A somewhat related question is that I want the html handler to be specific to the directory that the html file lives in. So I've modified the html handler fragment in web::interpmap in websh.conf to be

   # default html content (html that contains snipplets only)
   # all requests for *.html files share interpreters
   if {[string match *.html $file]} {
   return [file join [file dirname $file] htmlhandler.ws3]
   }

Again, I have the same question, how do I now configure interpclasscfg for each to change the maxrequests without having to list out each possible directory as a separate class ? (maxrequests will be same for all)

Any solutions ?

Thanks

/Ashok

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to