OK, I tried this. I don't get the impression that this makes the script run any faster. In fact I get the impression it runs maybe a little bit slower. Also this change makes the script less readable and writable.
PS. I put some timing code into the two versions of the script, and it confirms my subjective impression. The complicated string theory pages take 33-40 seconds to process. The version of the script with many str_replace() statements always takes 2 or 3 seconds less to complete than the one with a single str_replace() with array arguments.
Is the new caching helping the math filters?
it still works fine
the only trouble I had were:
1. I did not realize that filters are now declared in the database not in config.php (which had me baffled for a bit)
2. my debian Xalan v1.2-2 executable behaves slightly differently than Zig's and I suggest that the xalan variable include the first argument so that we debian-types don't have to go hunting for it in the system call way below
default xalan should be modified to "/usr/local/bin/Xalan - "
with an extra dash
and debian xalan can then be "/usr/bin/xalan -XSL "
thanks for making the mmltex.xsl use relative paths (that works)