From: Andrew P. <at...@pi...> - 2006-07-13 20:53:53
|
On Thu, Jul 13, 2006 at 09:28:00PM +0100, Stephen Deasey wrote: > Except... Rob found a neat way to cheat by passing the script as an > arg to a do-nothing 'for' command. 'for' compiles the script for you. > Very smart and hellish to read... Ok, some Tcl commands cause their script arguments to be compiled to bytecode, others simply interpret them directly. And Tcl interps automatically cache their own bytecode as necessary. So... Are you saying that Rob changed AOLserver 3.x such that it used 'for' rather than 'eval' (or whatever else) to run the code in *.tcl files? And THAT made all the difference, because as long as the *.tcl file had not changed, the Tcl interp would automatically find and use the bytecode it had already created the first time that particular *.tcl file was run? But if that's the case, then what does any of this have to do with per-thread caches? As you said, Naviserver is already cacheing the string source of *.tcl pages, so what's preventing you from using the same for/eval trick Rob used, for each interp? (I must be missing something here...) > > > I think the way to go here is to merge Tcl pages in with the ADP page > > > code. What's the difference between an ADP page like this: > > > > What would that accomplish? Is there already cacheing of the > > bytecodes of Tcl source included in ADP pages? > > Yes. And also, the bit below... > Right, output caching is a different thing. But wouldn't it be cool > to have it working for ADP pages, Tcl pages, registered procs etc.? Yes, indeed it would... -- Andrew Piskorski <at...@pi...> http://www.piskorski.com/ |