# Pagination and speed

**URL:** <https://forum.getkirby.com/t/pagination-and-speed/35511>\
**Category:** Questions\
**Tags:** v5\
**Created:** [July 14, 2026, 4:43pm UTC](https://forum.getkirby.com/t/pagination-and-speed/35511 "2026-07-14T16:43:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bntwmrt](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bntwmrt](https://forum.getkirby.com/u/bntwmrt)\
**Post date:** [July 14, 2026, 4:43pm UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/1 "2026-07-14T16:43:33Z")

</div>

Hi,

I have _staticache_ on my kirby website  
[Flux :: BW - code + design — Amiens](https://jaiunsite.com/flux/) is good but [https://jaiunsite.com/flux/page:2](https://jaiunsite.com/flux/page:2) not really.  
I know I have a page with a lot of images [archive instagram BW - code + design — Amiens](https://jaiunsite.com/flux/archivage-instagram)

So what can I do ? Split this post with many images (any tools ?) ? add a template for images ?  
Force cache for page:x ?

---

<div class="post-metadata">

**Author:** ![KranzKrone](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kranzkrone/32/7601_2.png) [@KranzKrone](https://forum.getkirby.com/u/KranzKrone)\
**Post date:** [July 15, 2026, 1:43pm UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/2 "2026-07-15T13:43:19Z")

</div>

I just visited your URL, on my Smartphone, and can’t really confirm the hassle with the speed of loading pages you described. 🤔

But I can imagine that having a really long one page like your archive has is not beneficial for loading speed, specially with lots of images in it.

Maybe you should split of you one long page in many separate one OR separate the whole archive into smaller more distinctive ones, thematically or by tags or something like that.

Just an Idea. 😉

---

<div class="post-metadata">

**Author:** ![helloanselm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/helloanselm/32/11487_2.png) [@helloanselm](https://forum.getkirby.com/u/helloanselm)\
**Post date:** [July 20, 2026, 6:31am UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/3 "2026-07-20T06:31:06Z")

</div>

There’s definitely something not working as expected at the moment with your Kirby performance. Page 2 loads in 5s-60s (mostly “waiting” state in http response) while page 1 in ~1s, with only 20 content items loaded for the pages.

@KranzKrone As said the given example of /flux page 2 shouldn’t be of that bad performance. It has not that much content that splitting up should be necessary. This looks like a code issue but without code we can’t say much more.

Have you checked what happens if you disable staticache?

1. How does your configuration look like in regards to routing, caching?
2. What code do you use for the pagination logic?

If you can’t further debug the issue from here, you can also find people who can help you professionally debug and optimize the site here in the community (yes, me, too).

---

<div class="post-metadata">

**Author:** ![bntwmrt](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bntwmrt](https://forum.getkirby.com/u/bntwmrt)\
**Post date:** [July 20, 2026, 10:36am UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/4 "2026-07-20T10:36:04Z")

</div>

Without Staticache it’s the same problem.

In my home page

```auto
<?php snippet('pagination', ['pagination' => $notes->pagination()]) ?>

```

collections notes.php

```auto
return function ($site) {
    return $site->children()->listed()->filterBy('template', 'note')->sortBy('date', 'desc');
};

```

snippet pagination.php

```auto
<?php
/*
  Snippets are a great way to store code snippets for reuse
  or to keep your templates clean.

  The pagination snippet renders prev/next links in the
  blog, when articles spread across multiple pages

  More about snippets:
  https://getkirby.com/docs/guide/templates/snippets
*/
?>
<?php if ($pagination->hasPages()): ?>
<nav class="pagination">
  <?php if ($pagination->hasPrevPage()): ?>
  <a class="pagination-prev" href="<?= $pagination->prevPageUrl() ?>">&larr;</a>
  <?php else: ?>
  <span class="pagination-prev">&larr;</span>
  <?php endif ?>
  <?php if ($pagination->hasNextPage()): ?>
  <a class="pagination-next" href="<?= $pagination->nextPageUrl() ?>">&rarr;</a>
  <?php else: ?>
  <span class="pagination-next">&rarr;</span>
  <?php endif ?>
</nav>
<?php endif ?>

```

and this :

```php
<?php
(function /* staticache */ () {
  $root = __DIR__. '/site/cache';

  if (php_sapi_name() === 'cli') return;
  if (in_array($_SERVER['REQUEST_METHOD'], ['GET', 'HEAD']) === false) return;

  $root .= '/jaiunsite.com_flux/pages';
  if (is_dir($root) !== true) return;

  $path = $root . '/' . ltrim($_SERVER['REQUEST_URI'] ?? '', '/');
  $path = preg_replace('#^' . preg_quote($root) . '/flux/#', $root . '/', $path);

  if (is_file($path . '/index.html') === true) {
    $path = $path . '/index.html';
  } elseif (is_file($path) !== true) {
    return;
  }

  if ($mime = @mime_content_type($path)) {
    header("Content-Type: $mime");
  }

  die(file_get_contents($path));
})();

require __DIR__. '/vendor/autoload.php';
echo (new Kirby)->render();

```

I have a CloudFlare to speed up the cache…

---

<div class="post-metadata">

**Author:** ![bntwmrt](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bntwmrt](https://forum.getkirby.com/u/bntwmrt)\
**Post date:** [July 26, 2026, 5:32pm UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/5 "2026-07-26T17:32:13Z")

</div>

What can I do step by step ?

---

<div class="post-metadata">

**Author:** ![bvdputte](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bvdputte/32/8179_2.png) [@bvdputte](https://forum.getkirby.com/u/bvdputte)\
**Post date:** [July 27, 2026, 6:08am UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/6 "2026-07-27T06:08:36Z")

</div>

I’ve seen perf issue reports which were related to referencing deleted pages: [Discord](https://discord.com/channels/525634039965679616/525641819854471168/1527947909105193001) Maybe it’s also such a thing?

---

<div class="post-metadata">

**Author:** ![bntwmrt](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bntwmrt](https://forum.getkirby.com/u/bntwmrt)\
**Post date:** [July 27, 2026, 3:10pm UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/7 "2026-07-27T15:10:21Z")

</div>

OK, I delete cache 🙂  
and  
0.3s on first page  
3s on 2nd page 😢  
(panel looks faster)

---

<div class="post-metadata">

**Author:** ![bvdputte](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bvdputte/32/8179_2.png) [@bvdputte](https://forum.getkirby.com/u/bvdputte)\
**Post date:** [July 27, 2026, 4:07pm UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/8 "2026-07-27T16:07:40Z")

</div>

I’m not sure deleting the cache helps tbh… As I understood it, it was the references to deleted pages that caused the delays. (It’s possible I haven’t understood it :P)

---

<div class="post-metadata">

**Author:** ![bntwmrt](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bntwmrt](https://forum.getkirby.com/u/bntwmrt)\
**Post date:** [July 28, 2026, 5:14pm UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/9 "2026-07-28T17:14:59Z")

</div>

Any idea ?  
I don’t understand why “make a page:X” is so long… just thumbnails, titles and excerpts.

---

<div class="post-metadata">

**Author:** ![bvdputte](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bvdputte/32/8179_2.png) [@bvdputte](https://forum.getkirby.com/u/bvdputte)\
**Post date:** [July 29, 2026, 7:51am UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/10 "2026-07-29T07:51:15Z")

</div>

are there any pages in the entire collection you’re paginating that are referencing no-longer existing pages or files? If not, you can discard my comment.

---

<div class="post-metadata">

**Author:** ![bntwmrt](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bntwmrt](https://forum.getkirby.com/u/bntwmrt)\
**Post date:** [July 29, 2026, 3:12pm UTC](https://forum.getkirby.com/t/pagination-and-speed/35511/11 "2026-07-29T15:12:55Z")

</div>

Probably, I change some names and urls. This is a staticache problem or kirby problem ?
