stffr
May 25, 2022, 7:02am
1
I have a site.yml with some tabs.
In one tab I have three relationship fields (Relationship field | Kirby CMS Plugins )
In two other tabs I have standard multiselect fields.
In everyone of those fields I need access to every page, because the editor might need to link to an internal page.
Example:
link:
type: multiselect
max: 1
options: query
required: true
query:
fetch: site.index
value: {{ page.autoid }}
text: {{ page.title }} - {{ page.uri }}
There are about 900 pages. The panel and the fields feel sluggish and the multiselect filtersearch doesn’t work all the time.
What would be the best way to improve the performance of those fields?
Thanks!
Since you are apparently using the AutoID plugin, maybe this?
Boost the speed of Kirby by having content files of pages cached, with automatic unique ID, fast lookup and Tiny-URL. - GitHub - bnomei/kirby3-boost: Boost the speed of Kirby by having content file...
…note the “Migration from AutoID” chapter in the Readme.
stffr
May 25, 2022, 8:12am
3
Thanks!
I was hoping there was something (caching maybe) I could do in Kirby to improve performance. But I might as well go the plugin route
You could of course implement your own lightweight caching solution – calling a custom site method from your fetch
statement which would return an index of pages that you can cache using Kirby’s plugin cache (plus a hook setup that flushes your cache when content is changed).
There’s actually a brilliantly detailed thread on caching, with this post particularly addressing the task you are looking at ; that could contain some valuable ideas.
1 Like
stffr
May 25, 2022, 10:23am
5
I will check that out.
Thanks!
stffr
June 29, 2022, 7:20am
7
I already posted it in the other thread, but if someone needs a solution: I found this to reduce the sluggishness: Multiselect | Kirby CMS
search:
min: 3
display: 10
bnomei’s caching solution will also be added in the near future, but this helps tremendously already.