Improve performance of PM Status checks

Created on 27 June 2024, 6 months ago

Problem/Motivation

The Package Manager status checks are a necessary but time consuming process. While there may be some performance improvements that could be made upstream, we may be able to make this a more palatable user experience by changing when we invoke them.

Proposed resolution

Move the Status Checks to be behind an endpoint, and have the frontend enforce running the status checks prior to any add-and-install action. This might be by invoking it whenever we hit the main PB route, or it may be before trying an add-and-install operation, or both.

We could potentially introduce caching of the results on a short timeframe (2 minutes or something), if desired.

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chrisfromredfin
  • First commit to issue fork.
  • Merge request !534Initial commit of sime's work β†’ (Open) created by phenaproxima
  • Pipeline finished with Canceled
    6 months ago
    Total: 114s
    #210088
  • Pipeline finished with Success
    6 months ago
    Total: 349s
    #210089
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    As I was restoring @sime's work in the MR, I realized something...we probably don't want to cache the actual results. That could be really problematic if you've cached a state of "no results", but an error condition is being created in the background.

    What we really want to do here is run the status checks less often, I think. So what if we simply cached a flag that said "hey, we ran the status checks at such-and-such a time", and give it a 5-minute TTL? And when it expires from the cache, we run the status checks again.

    And, just to cover our asses, we also run the status checks in \Drupal\project_browser\Controller\InstallerController::begin() (clearing the cached last-run-time first).

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    I don't think this should be a beta blocker.

    That's not to say the status checks are slow, 'cause they are. But they're not so slow that they're, like, consuming gigabytes of RAM and all of the server's CPU resources. So this is more just something that sucks, and it does need to be addressed, but it's not a critical thing that needs to block a beta.

  • πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

    re-marking for stable-blocking then.

Production build 0.71.5 2024