Forum OpenACS Q&A: Re: Expected non-db overhead time on an OpenACS page?
I had maxthreads 20, and the defaults for minthreads and threadtimeout, which I think are 0 and 120 s, respectively. Not so good. On my Dev server, I set min and max threads both to the same number, threadtimeout to 3600 (1 hour), and tried again: Yep, saw what you'd expect:
First time a thread serves a request for a page, it's kind of slow, presumably due to the calls in template::adp_init to template::util::read_file and adp_compile. The second and subsequent times a thread servers a page, template::adp_init no longer sources the file like that, and things are faster. Some ns_logs I put in show that yes, each chunk of the page really is only being sourced once.
So everything seems correct, and speed is much improved now that I fixed my thread mis-configuration.
Things are still a bit slower than I'd like, database time of 300 ms (fast), total page serve time still of 1 or 1.5 seconds or so (kind of slow). But should improve noticeably once I move this to a much faster Linux server, and also when I switch to Tcl 8.4, so I'm happy for now.
Hm, it would be rather nice if the Developer Support request-info page reported stuff like whether the page was sourced this time around or whether it had already been cached to a proc...