I want to run a basic performance audit of Tome and fix easy-wins where I find them. I'll document audit results in this issue and either upload a big patch here, or open follow ups.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3017424-3.patch | 393 bytes | samuel.mortenson |
Comments
Comment #2
samuel.mortensonSo far, I've found that the slowest part of Tome Static is the request to Drupal, which is good because it means Tome's caching isn't too much of a burden. We should throttle the main loop for concurrent processes, I found that for a simple site there were over a hundred thousand calls to Process::isRunning(), which isn't that slow but is resource intensive.
Comment #3
samuel.mortensonHere's the main loop throttle - even a sleep as short as 5/100ths of a second reduces calls significantly. This will technically make Tome commands a bit slower, but a lot less resource intensive, I think.
Otherwise, the performance audit so far hasn't been very useful. I'm using XDebug's profiling and have consistently found that the largest bottlenecks are in Drupal core. For Tome Static, Twig template compiling and libraries take up a lot of time. For Tome Sync, all the slow-downs are in the normalization and entity storage APIs. Site installs and config imports are also quite slow when using tome:install/tome:import.
So what else can we do in Tome to help...I'm not sure yet! Any opinions are welcome here.
Comment #5
samuel.mortensonJust committed the throttle for good measure.
Comment #6
samuel.mortensonSetting back to "Needs work" because a more in depth audit is welcome. Un-assigning in case a community member has suggestions for performance improvements.
Comment #7
samuel.mortensonI think if I or someone else does a performance audit they can submit results in new issues.