Skip to main content

PaginationSize

Ensures that objects are paginated with performant sizes so that too many objects aren't loaded at once. This helps to keep response times low.


The following examples contain code snippets that either fail or pass this check.

The following example includes a pagination size that leads to too many products on a single page, exceeding the max_size value:

{% paginate collection.products by 999 %}

The following example includes a pagination size that will not negatively impact performance:

{% paginate collection.products by 12 %}

PaginationSize:
enabled: true
min_size: 1
max_size: 50
ParameterDescription
enabledWhether this check is enabled.
min_sizeThe minimum valid pagination size.
max_sizeThe maximum valid pagination size.

Anchor to Disabling this checkDisabling this check

This check is safe to disable.


Was this page helpful?