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

There's no impact on memory as you have an interpclass for every
script you use anyway. The only impact is that you call
web::interpclasscfg way too often. It is not really an expensive call
though, but it needs an additional lock on some internal resource and
locks can be bottlenecks. I can't tell you however whether this is
worse than creating the overhead of tracking the files you already
have configured:

 if {[string match *.html $file]} {
   set script [file join [file dirname $file] htmlhandler.ws3]
   if {![info exists pool($script)]} {
      web::interpclasscfg $script maxrequests 10
      set pool($script) 1
   }
   return $script
 }

This takes a bit more memory (the pool array) but as I said: don't
know if it actually makes a difference. Could be even slower...

Ronnie
-- 
Ronnie Brunner | [email protected]
phone +41-44-247 79 79 | fax +41-44-247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch

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

Reply via email to