Page sections load slow - Kirby 4.2 issue?

Has anyone else experienced that after updating to 4.2 the page listing in the panel is very slow in places? I thought it was my local server acting up but it’s the same on the live server.

One collection is 100 pages which loads in 10 seconds. In another place I have 33 pages which takes about 6 seconds to appear.

Oddly there are some pages with 30 – 350 children that loads normally, as well as the site dashboard which lists hundreds of pages in multiple sections. I’m clueless on how to debug this?

1 Like

From which version did you update?

Hi, I updated from 4.1.0

@texnixe this might be interesting: If I change the slow-loading sections from layout: table to list or cards the problem goes away and they load immediately. Whenever I use table it becomes extremely slow (even if only 1 page in a section there’s a delay). I also tested removing all columns just to make sure there were not any template string causing the issue, but columns or not didn’t make any noticable difference.

I can confirm this behaviour. I have created a table layout that lists 80 pages, it takes 7 seconds to load. If I switch to cardlets, the page loads in 2 seconds.

Table-Layout:

Cardlets:

1 Like

Can I place my bets on Fix toggle field preview value error · getkirby/kirby@75eb89c · GitHub ?

It seems to introduce a new instantiation (new Form($model)) which is run for every row in the table.

@rasteiner Hmm if that is the case, then there should only be issues if there’s a toggle field present in the blueprint?

Logically I would also assume it should only have an impact if the toggle field value is actually displayed in the table (with the column property). But maybe that’s not how it works?

At the moment I have no easy way of verifying if the toggle field is to blame. My worst performing sections do have a lot of toggle fields in them but simply commenting them out from the blueprint doesn’t seem to make a difference. But I have a lot of extends so also possible I missed a toggle. There’s also the toggles field (plural) which I didn’t remove.

@GB_DESIGN is this something you can check in your setup?

Maybe @texnixe have any insights? Should we file an issue on GitHub?

From looking at the code, while the commit is supposed to fix an issue with the toggle field, what @rasteiner wrote will affect any table layout, no matter what columns are used. So yes, would file an issue on GitHub.

Allrigt I opened an issue

I don’t use toggle fields, just a list of pages that have been changed recently.
And here I notice a much faster display when I switch to cardlets.

changedpages:
  label: "Recently edited pages:"
  type: pages
  query: site.index(true).sortBy('modified', 'desc')
  create: false
  layout: table
  limit: 50
  search: true
  columns:
    parentpage:
      label: "Parent page"
      value: "{{ page.parent ? page.parent.title : '–' }}"
      width: 1/6
    day:
      label: Date
      value: "{{ page.modified('Y-m-d') }}"
      align: center
      width: 1/6
    time:
      label: Time
      value: "{{ page.modified('H:i:s') }}"
      align: center
      width: 1/6
  image:
    back: "#000000"
    color: "#ffffff"
    query: false

I use retour from distantnative, where pages are also displayed as a table. However, the pages load very quickly here.

Can you clarify if there is no toggle fields in the blueprint of the pages that you are listing (or just on the page with the listing)?

Now I understand: The problem is not the overview page, but the toggle fields on the listed pages.

And yes, there are toggle fields on EVERY page, because I use them as page settings.