I've been playing around with some of the code and noticed that the sample tutorial pages (portfolio showcase) usually take around 250ms up to 750ms without caching enabled. I'm trying to get that down to 100ms and have been exploring ways to get there since tthe pages are really simple, and with caching enabled it's about 20ms or less.
My goal is to find ways to tweak the couch performance, before caching or any other features, and see how far I can get. It's not that I'm terribly concerned with the performance, but I like to push it to the extreme, before I build out complex websites, and then apply caching and service workers on top of that. Starting with the foundation seemed like a good idea.
I definitely tried playing with the existing tags and code, reducing the required files that are getting imported, the opcodes and cache settings queries, as well as the performance tips posted here in the forum,
By looking closer at xdebug traces and profiling it seems a lot of it has to do with the parsing approach (examining character by character). Not knowing anything about building such a marvelous parser that couch has, I wonder two things:
On the caching, more specifically,
I'm exploring to play with some of these things on the caching side, and see what I can put together, but wanted to check on the parser side first.
My goal is to find ways to tweak the couch performance, before caching or any other features, and see how far I can get. It's not that I'm terribly concerned with the performance, but I like to push it to the extreme, before I build out complex websites, and then apply caching and service workers on top of that. Starting with the foundation seemed like a good idea.
I definitely tried playing with the existing tags and code, reducing the required files that are getting imported, the opcodes and cache settings queries, as well as the performance tips posted here in the forum,
By looking closer at xdebug traces and profiling it seems a lot of it has to do with the parsing approach (examining character by character). Not knowing anything about building such a marvelous parser that couch has, I wonder two things:
- Has it been considered, or is work in progress, to take a different approach to gain a massive speed increase? I don't know what it would look like, but I wonder if there are more efficient ways to do such complex template parsing?
- Has it been considered, or is work in progress, to do a little bit more with the caching functionality?
On the caching, more specifically,
- only invalidate the pages belonging to the template that received an update instead of all cached pages, and
- generating the cache after the update happened to a page in the back-end, and
- a special tag that is excluded to allow some dynamic php code in the template to remain after caching (I understand that this is not how the cache works current)
- some kind of warm caching script that crawls the links on a page to create the cached pages
I'm exploring to play with some of these things on the caching side, and see what I can put together, but wanted to check on the parser side first.