Slow render time

Created on 2 December 2024, 21 days ago

I appreciate this has been raised before in various issues but those all appear to be closed now. There appears to have been work done to resolve which was previously in the codebase but this seems to have been removed around the birth of the 2.1.x.

Problem/Motivation

When and calendar view is rendered, all possible rows are found and rendered, even when they do not appear in the given month/week/day being shown. Note that the suggested mitigation at this documentation page help but not when pagination is in use, in fact using that suggestion will prevent any results appearing when paging to another period.

In sites with large numbers of events, this can cripple performance.

Steps to reproduce

  • Create a large number of nodes with a date field with dates spread across several months
  • Create a calendar view to show these nodes
  • In a template file or preprocess function for those nodes, trigger some method of debugging the date fields when rendered (dump, dpm, etc)
  • View the calendar

The result is dates for all the nodes will appear in the debugging. Note that this even happens when paging to a period with no results.

Proposed resolution

Reimplement / port the filtering based on pagination.

Remaining tasks

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇬🇧United Kingdom PQ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024