Replies: 1 comment
-
|
I went a bit further down the rabbit hole and profiled where the warming time is actually spent. The majority of the Stache warming time appears to be really in YAML parsing. When I switch from Symfony’s YAML to the PECL yaml extension, warming time drops from 56.8s to 22.18s in my setup 🤯 Unfortunately, we cannot just swap the parser since the PECL extension only supports YAML 1.1. Concurrent YAML parsing would likely have a much larger impact on Stache warming than the current store-level parallelism approach If you want to try this with pecl yaml change in https://github.com/statamic/cms/blob/6.x/src/Yaml/Yaml.php#L63 - $yaml = $this->yaml->parse($str);
+ $yaml = @yaml_parse($str); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I’ve been taking a closer look at the new Stache warming config introduced in #12894. Really appreciate the work on this 🙌
After digging into the implementation / benchmarking it on a few real sites I might be missing something, but I’m currently not seeing meaningful improvements in warming times for larger collections..
Some details about my Statamic site:
Benchmark for stache:warm:
Enabling parallel warming (via
STATAMIC_STACHE_PARALLEL_WARMING=true) made it always a bit slower 🥲 I monitored the processes during parallel warming. 13 spawn, 12 finish in 0.4s and 1 process runs for the remaining seconds.The real work is probably for most real-world sites inside a single
CollectionEntriesStore, which processes in my case all 8000 files sequentially.I’m struggling to think of a realistic scenario where the new config options would make a difference. The only potentially expensive stores seem to be entries and maybe terms.. Would it make more sense to explore parallelism within a store instead (e.g. chunking 8000 entries across cores for YAML parsing)?
Curious to hear the team’s thinking here, maybe parallel warming was meant to address a different use case? :)
Beta Was this translation helpful? Give feedback.
All reactions