You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Kirby 4.2 and 4.3, the pages section currently can be hit by a drastic performance issue when used with table layout and using computational heavy parts anywhere in the blueprint (e.g. accessing a large index in a query).
This is because our field and blueprint classes resolve everything very greedily, unfortunately. So setups that somewhere in the blueprint work with the site index or just any performance-heavy thing really get tolled as likely for every table row the blueprints are newly resolved etc.
Current workaround
From Kirby 4.4. onwards, you can add rawvalues: true to your section in the blueprint. What does it do:
It reverts the behavior to pre-4.2, which is passing raw values from the content file to the table preview components. This can cause other problems with the field previews, e.g. the toggle field would receive a string not a bool. Some previews won't work then in your setup.
Overall, we know this isn't a great solution. It's more a trade-off for developers as many setups might be fine with one of the two versions: Some are not faced with the performance issue and are happy with correctly passed values, others might be able to work around the broken field previews as long as the pages section doesn't completely slow down the Panel for them.
Problem description
In Kirby 4.2 and 4.3, the pages section currently can be hit by a drastic performance issue when used with table layout and using computational heavy parts anywhere in the blueprint (e.g. accessing a large index in a query).
This is because our field and blueprint classes resolve everything very greedily, unfortunately. So setups that somewhere in the blueprint work with the site index or just any performance-heavy thing really get tolled as likely for every table row the blueprints are newly resolved etc.
Current workaround
From Kirby 4.4. onwards, you can add
rawvalues: true
to your section in the blueprint. What does it do:It reverts the behavior to pre-4.2, which is passing raw values from the content file to the table preview components. This can cause other problems with the field previews, e.g. the toggle field would receive a string not a bool. Some previews won't work then in your setup.
Overall, we know this isn't a great solution. It's more a trade-off for developers as many setups might be fine with one of the two versions: Some are not faced with the performance issue and are happy with correctly passed values, others might be able to work around the broken field previews as long as the pages section doesn't completely slow down the Panel for them.
Additional context
Code that causes the performance issue: https://github.com/getkirby/kirby/blob/main/config/sections/mixins/layout.php#L136-L150
The text was updated successfully, but these errors were encountered: