Improve performance of PM Status checks

Created on 27 June 2024, 2 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.

A slightly easier mitigation, involving short-lived caching, is proposed in #4.

πŸ“Œ 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
    2 months ago
    Total: 114s
    #210088
  • Pipeline finished with Success
    2 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
Production build 0.71.5 2024