picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.83k stars 617 forks source link

Performance on large number of pages #158

Closed geedmo closed 8 years ago

geedmo commented 10 years ago

That's not really an issue.

If you are interested, I've been playing with Pico regarding to issue #97 and I made a few changes and a little performance check which gave me nice results. A brief summary in the repo https://github.com/geedmo/Pico

When you get chance, I would like to know your thoughts.

Frodox commented 10 years ago

Also, try to check out fork of Pico -- PhileCMS, may be you will like it :)

geedmo commented 10 years ago

PhileCMS is more complex and it goes beyond the philosophy of Pico. Just my opinion, thanks anyway.

mistergraphx commented 9 years ago

Hi @geedmo,

i just test your modifications, with 90 articles, and i've a better result without : as you say, the testing method is what it is ;-) but i'm astonished of these results.


Without optimisation :

Start: 05:20:41

End: 05:20:41

Processed: 90

Elapsed

0.23807597160339 seconds


With complete optimisation (page_content() & exerpt):

Start: 05:34:32

End: 05:34:32

Processed: 90

Elapsed

0.29801678657532 seconds


Without parse_content() only

Start: 05:24:01

End: 05:24:02

Processed: 90

Elapsed

0.30226588249207 seconds


mistergraphx commented 9 years ago

Hi, After doing more test

i've a flat file cms tool that i've made for me (named Little), the solution i've found is to write a temporary index.json file containing page list, page url, page.title, resume, md5 sum ... each page we just've to verify the index state and compare it to the the file system ... may it's quicker than parsing on every action ...

So i've test rendering the same article in Little and Pico (with cache enabled)

Pico with Twig : Elapsed: 0.1051 seconds "Little" with mustache.php : Elapsed: 0.095 sec

Playing with this, i've discover that the choice of the template engine is a perf issue too ! Twig is slower, due to he template inherance and more complex/logical layouts certainly.