Performance issue with moving pages

I have a performance issue with moving pages:

A customer has a page with lots of news (around 300) and success story (around 100) items. These are two different blueprints and two different folders, but it is allowed to move items from news to success stories.

The opening of the “move”-dialog takes around 5 seconds, the opening of the news children takes around 30 seconds and success stories children around 10.That’s the time it takes for “/panel/site/tree?move=…” to load. That’s the time it takes for “/panel/site/tree?move=…” to load.

Does anyone have an idea where to look for this bottleneck?
Thanks!

Most likely the move dialog fetches a lot of data, scanning folders and reading content files to provide possible target folders.

Consider reporting this as an issue at the GitHub - getkirby/kirby: Kirby's core application folder repository.

Thanks a lot for your reply!
I’ve found the problem: in this installation we have a folder “global-images” because the customer wanted to have a image library. That folder is filled with around 700 images.
If I remove this folder everything is fine. With this folder the dialog is really slow.

You could make a custom model for that “image pool” page and have it set isListable to false (docs). That should remove it from the dialog list (route: site/tree)

BUT there might be side effects to this. like it not appearing anywhere in the panel. I did not fully test that myself.


<?php

use Kirby\Cms\Page;

// NOTE: Imagepool should be whatever template you are using
// like content/all-images/imagepool.txt
class ImagepoolPage extends Page
{
    public function isListable(): bool
    {
        return false;
    }
}

I’ve created the custom model, the folder is not listed in the dialogs (e.g. in the link field as well) anymore, which is great, thanks for that!

But the performance in the move dialog is still not great. Opening on my local machine is still 5s
CleanShot 2025-05-09 at 06.38.48@2x

and the click in the tree on page to view the children (100 children) is around 38 secondes:
CleanShot 2025-05-09 at 06.43.58@2x

@bnomei do you think this is a bug or a result of the architecture of Kirby?

We’ve should never created that “global image library” the way we did for this project :man_facepalming:

Thanks again for your investigation!

I would create an issue and report the performance bottleneck. The core team will be able to pinpoint the cause and maybe have an idea for a fix.

1 Like