logo       

filter caching (done :): msg#01046

php.drupal.devel

Subject: filter caching (done :)

Hi people!

After we have turned on bbcode, glossary, html escaping, and some custom developed filters (including a small bbcode addon and an email address obfuscator) we have experienced our Drupal site producing pages very slowly. We have checked memory, our opcode caching, but everything seemed to work fine, so it seemed that the filters are slowing everything down.

So I have digged up the filter caching patches from Steven and adapted them to current CVS needs (dropping the $donotcache stuff on the way, especially that I needed a semi-drop-in solution as much as possible). Here it is: a filtercache.module with its own database table which plugs into Drupal to cache the filtered texts, thus speeding up sites with expensive filters a lot.

It needs some small core changes, so check_output() is not defined in filter.module if filtercache.module is present and the cache is emptyed if any filter settings change, or modules get enabled / disabled.

We have apachebenched our site without filter caching and with filter caching, and we experienced an average of five times speed increase if caching is used. Therefore I would only suggest it to anybody who is in the trouble of not being able to use expensive filters because of their extremely slow code... Feel free to do more benchmarks against it :)

Steven: this renders the filter caching stuff in your sandbox obsolote, but I have not removed it, but let you do it...

Goba




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise