automatic_updates_modules_installed() significantly slows down module install

Created on 1 August 2024, about 2 months ago
Updated 21 August 2024, 26 days ago

Problem/Motivation

Usually, Starshot is installed very quickly. For some reason, the installation now takes much longer, just short of three minutes. It looks like the installation of each modules takes about 7 seconds.

Perhaps there is a setting in Automatic Updates which can be added in Starshot to not check for status, assuming this is the problem?

Originally reported in Installation stalls for a minute, or more #157 in Starshot Github repo.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

3.1

Component

Code

Created by

πŸ‡©πŸ‡°Denmark ressa Copenhagen

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

Merge Requests

Comments & Activities

  • Issue created by @ressa
  • πŸ‡¬πŸ‡§United Kingdom catch

    automatic_updates_modules_installed() should at least check the $is_syncing parameter and not show when that's TRUE, although I can't remember off the top of my head whether that gets set during site install.

    It's not clear to me exactly why these need to be run immediately and can't just be shown on the status report though, or whether they couldn't be moved to a submit handler on the module install form (or even whatever page that redirects to) rather than also being done during site install, drush etc.

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

    @tedbow and I discussed it and although we're open to other options, the thing we should do in the short term to stop the bleeding in the Starshot prototype is not run the status checks if Drupal is in the middle of being installed.

  • Merge request !1091Skip status checks during site install β†’ (Merged) created by phenaproxima
  • Pipeline finished with Success
    about 1 month ago
    Total: 1235s
    #242105
  • Status changed to Needs work about 1 month ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    Double checked the installer and $is_syncing is explicitly set to false there, so wouldn't help by itself and we'd need the separate installer check anyway.

    I think this should check both tbh - i.e. it shouldn't be doing this during a config import either, the admin has already seen the message when the module was installed on local, or at the very least won't see it during a site deployment.

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

    I concur. I added a check for config sync, and test coverage for both scenarios.

    Also tagging this as critical since it is a serious performance problem.

  • Status changed to Needs review about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 1885s
    #242418
  • Pipeline finished with Success
    about 1 month ago
    Total: 89953s
    #242427
  • Status changed to RTBC about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

    Looks good!

  • Pipeline finished with Canceled
    about 1 month ago
    Total: 155s
    #247002
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 159s
    #247003
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • Assigned to phenaproxima
  • Status changed to Needs work about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA
  • Pipeline finished with Success
    about 1 month ago
    Total: 1197s
    #247004
  • Issue was unassigned.
  • Status changed to RTBC about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Nice idea; done. I'm restoring RTBC here on the assumption that tests will pass.

  • Pipeline finished with Success
    about 1 month ago
    Total: 1322s
    #247036
  • Pipeline finished with Skipped
    about 1 month ago
    #247097
  • Status changed to Fixed about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024