I am working on a site that has an employees channel with over 1000 entries. When a user visits the "all employees" page we are paginating the results and all is well, however when a user views the print template for this page the client would like the full list of employees to be shown. When this template is loaded the request times out.
I have optimised the template as best I can (simple conditionals, etc) and tried upping the PHP execution time, but still no luck. I think the biggest killer to rendering is that we need to access a matrix and a playa field for each employee. If anyone has any advice on ways to get this page to load that would be greatly appreciated.
EDIT: Updated with code sample
{exp:channel:entries
site="default_site"
channel="employees"
orderby="title" sort="asc"
disable="categories|category_fields|member_data|pagination"
limit="10000"
entry_id="{alpha_ids}"
cache="yes" refresh="720"
}
<tr>
<td>{title}</td>
<td>{p_position}</td>
<td>{p_locations limit="1"}{office site="default_site"}{title}{/office}{/p_locations}</td>
<td>{if p_locations}{p_locations limit="1"}{phone}{/p_locations}{/if}{if p_locations == ""}{p_phone}{/if}</td>
<td>{p_email_address}</td>
</tr>
{/exp:channel:entries}
In this code snippet {alpha_ids}
is the result of filters (in the case causing the issue, this contains all entries). {p_locations}
is a matrix field. The columns in this matrix are {office}
(playa single-select) and {phone}
(text field).