As much as I hate having queries in a seperate file, I am not sure if pre-processing the tcl is such a good idea.
If the first step in installing openacs is "compile the actual tcl scripts" I would have serious concerns that the we would see two things
- Mysteriously broken code which would result from errors in the parser or quirks in the particular source tcl.
- even more difficulty in merging improvements from particular sites back into the code base.
If it were a cleaner language or if we had a full parser I would not worry quite so much but regardless of how good the parser is, the later problem
will remain.
I don't see a lot of evidence that the QD overhead is anything
to be that concerned about relative to going to the DB in the
first place.
I think there is probably a better argument for precompiling
adp files rather than doing them on the fly, although there it is much clearer that what you are doing is compiling and
no one would really be tempted to discard the adp's and work
directly with the resulting code.