Thanks, I thought I'd repressed all memory of an ancient version of the Remedy "web interface" but this remark brought it all back. A whole bunch of little CGI shell scripts which all sourced one mongo common file which defined shell functions to implement all the different behaviors (all of which had to be parsed for every single invocation).
(Rewrote most of it in Perl and it went from 5+ seconds to generate a page to ~2 seconds; moved to Apache::Registry under mod_perl and got that down to actually useable).
*shudder*