Search cache turned off?

I was looking if there is a way to improve the performance of search in my app.

(Admittedly, I have over 13 thousand pages – which is probably far outside the use-case of Kirby.)

Browsing through the source code of the panel, I noticed a bunch of commented out code and a comment saying ‘temporarily disable the search cache’:

Is this a mistake, or has it not been implemented yet?

That change was made in October 15, I can’t see what issue that relates to, @bastianallgeier?

Actually, I am guessing that even if this cache were to be implemented it wouldn’t have much effect for me, since it would be emptied whenever a page is edited.

Yesterday I hacked up a speedier (but platform specific) search that uses shell_exec in combination with the find / grep linux utilities for searching… down from 15 seconds to 1-2 second searches… still not super fast, but good enough for now

That’s true, unless it was rebuilt thereafter.

1 Like

Slap it into some DB. I tried almost everything and if you need something sensible (everybody expects google type of supersmart search) you need lot of things like stemming, ranking, coalition and if its nonenglish language… well you need that even more.

After some time i realized putting it into postgres or mysql was the most performant thing.

I dont like to run db. Sqlite is also great option - you need just install binary and your db is just file. Its also magnitudes faster than flatfile seach.

Btw i am fan of your work Jonathan!

1 Like