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.

CommentFileSizeAuthor
#3 3017424-3.patch393 bytessamuel.mortenson

Comments

samuel.mortenson created an issue. See original summary.

samuel.mortenson’s picture

So 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.

samuel.mortenson’s picture

Status: Active » Needs review
StatusFileSize
new393 bytes

Here'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.

  • samuel.mortenson authored c1303f4 on 8.x-1.x
    Issue #3017424 by samuel.mortenson: Throttle concurrent process loop.
    
samuel.mortenson’s picture

Just committed the throttle for good measure.

samuel.mortenson’s picture

Assigned: samuel.mortenson » Unassigned
Status: Needs review » Needs work

Setting back to "Needs work" because a more in depth audit is welcome. Un-assigning in case a community member has suggestions for performance improvements.

samuel.mortenson’s picture

Status: Needs work » Closed (outdated)

I think if I or someone else does a performance audit they can submit results in new issues.