This is a static dump of issues in the old "Flyspray" bugtracker for DokuWiki. Bugs and feature requests
are now tracked at the issue tracker at Github.
FS#546 feedcreator performance tweaks
CSS, XHTML, JS, Browsers
There are a few simple ways to greatly improve the performance of the classes in feedcreator.class.php. These changes will also improve server availability -- the peak load that the server can handle. The changes:
(1) Change double-quotes to single-quotes where variable substitution isn't occurring. Most and perhaps all of the string constants are using double quotes. However, be careful to separate "\\t" and "\\n" into double quotes.
(2) The classes currently build the feed via string concatenation. This is very taxing on server resources, given the number of strings and concatenations. Change the approach to write to a nested output buffer and only use string concatenation very sparingly when clarity would otherwise be sacrificed.
(3) Loops are using the notation "$this->item[$i]->field" for every single field access. These should be replaced with a single "$item=$item[$i]" and then "$item->field" for each field access.
(4) This isn't related to performance, but while you're in there, you might as well replace the tabs with spaces at four-space tab stops.
Oops, in (3) I meant "$this->items[$i]->field" and "$item=$this->items[$i]". The array is plural.
performance gains should be small on modern PHPs, keeping a 3rd party lib as untouched as possible is more preferable