Kirby performance with over 60K simple pages

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?

19 Likes

Its pretty fast when you dont have shared host and you have ssd. I mean realy 250ms request is not bad at all.

For stuff i do i will probably never hit the bottleneck.

Its suprising to see people not using filebased cmses because of performance when they then put their site on shared hosting and make it with wordpress.

PHP7 also made things a lot more fun :slight_smile:

2 Likes

Wow, thanks for sharing this. :thumbsup: Although — like you already stated — this is a very simple example, it gives a good impression of what Kirby is capable of when dealing with lots of pages. Your test results are very valuable information, as it shows that even such a large number of pages can still be handled by Kirby.

1 Like

@pedroborges Thanks for sharing this test! This is very good information to know. Kirby is pretty darn amazing. :slight_smile:

2 Likes

How fast/slow is a search over all this pages?