I have always wandered in which areas Kirby would slowdown with thousands of pages so triggered by this thread I have setup a test installation to do some testing for myself. I’m so impressed I need to share this with you all!
Having access to databases of the Bible in two languages, I decided to import those into Kirby. The Bible has 66 books, 1189 chapters, and over 31K verses. I have each of those as a page in Kirby. For two languages that totals almost 65K pages. I know those are simple pages but it’s still a huge number of files for Kirby to go through. This is the structured I have decided on:
bibles
|
|___ translation
| |___ book
| | |___ chapter
| | | |___ verse
| | | |___ verse
| | | |___ verse…
| | |___ chapter…
| |___ book…
|
|___ translation
|___ book
| |___ chapter
| | |___ verse
| | |___ verse
| | |___ verse…
| |___ chapter…
|___ book…
Most pages are processed by PHP in < 10 ms using ~ 2 MB of memory. The largest page which fetches and displays data from 150 chapters and 176 verses (total of 326 pages) takes PHP ~ 25 ms to process and the same amount of memory as the other pages.
I have also setup a random verse page. It gets all pages from one language (> 31K), shuffles them then takes the first one. It takes ~ 250 ms of processing time and ~ 20 MB of memory. With cache enabled this would be a one time thing until cache is flushed.
Those milliseconds refer to the time to process from the first line of the index.php
files until after the echo $kirby->launch()
line.
The panel UX is also pretty fast, no lagging at all. I have setup a test user so you can see for yourself: https://bible.pedroborg.es/panel (user/user)
I haven’t enabled cache at all. So enabling it will give even better results, specially when filtering or doing other manipulations on a pages collection before outputting it.
This is running on a $10 Linode (referral link) with 2GB of RAM, SSD storage, PHP 7.1.0 and Nginx 1.11.5. It runs faster on my Linode than on my MacBook Pro. I guess they have way faster SSDs.
I totally understand this is a simple test. I may improve this test in the future by adding more content to pages to try doing some filtering. Anyways, my take away is that Kirby can handle lots of pages really well. Cache is there to make the results even better.
What’s your experience with Kirby performance?