I'm running into memory issues with a page that lists lots (hundreds, eventually 1000+) of little news items that consist of a title, date, and sometimes brief description. These are each channel entries, and I've taken the following steps to reduce memory usage and speed up page rendering:
- utilize the {exp:channel:entries} disable parameter (
disable="categories|category_fields|member_data|pagination"
) - cache the entire page output with CE Cache (
{exp:ce_cache:it id="page" seconds="3600"}
) - maintain a relatively high PHP memory limit (256MB)
- avoid rendering any more complex fields (Playa, Matrix, etc.), which are this case part of the entries but not used on the page
I also attempted to temporarily boost PHP's memory using ini_set('memory_limit', '1024M')
before the exp:channel:entries call in the template, then ini_set('memory_limit', '256M')
after, but this doesn't work. (Never tried this in a template, so I'm not surprised anyway.)
Are there any common practices or alternate approaches that would be appropriate here?
Or, is this just a nonsensical goal that's forcing a no-win outcome?