Forum OpenACS Development: Speeding up IRC log pages

Collapse
Posted by Dave Bauer on
I investigated the irc log pages today and they were very slow. The database access was very fast around 70-80ms so that was not an issue.

I looked into it some more and found that all content in edit-this-page was being converted through the template::util::richtext::get_property procedure. In the case of the IRC logs this was unecessary since they were already formatted as HTML. The only time conversion is necessary is if the content is "text/plain" or "text/enhanced".

It looks like the conversionm proecdure might also be slow with content marked as text/enhanced if it contains a large amount of embedded HTML tags.

I added a check around the code that performs the conversion and skip that step if the content is alrady text/html. The pages now serve in less than 1 second instead of 100-200 seconds per page.