[meta] Improve WebTestCase / BrowserTestBase performance by 50%

Created on 11 June 2016, about 8 years ago
Updated 5 June 2023, over 1 year ago

Problem/Motivation

- Tests are slow and installation takes a long time (both for d.org test runs and local development)
- Backdrop found out that installation is deterministic and can easily be cached per profile

Credit: https://github.com/backdrop/backdrop/pull/1366

Their patch works, but is preparing for a known set of profiles instead of demand.

Proposed resolution

- Introduce --cache option for BC compatibility
- Cache database tables and files after installation
- Re-use cache when it exists
- Prevent race conditions with transactions
- (optional) Convert tables to MyISAM to speed up DB copy and test runs

99% of people don't change the database data or schema during development, so the cache will work fine.

Remaining tasks

- Upload patch
- Check that tests pass
- Port to Drupal 8 as trait and implement in BrowserTestBase as well
- Get it committed to Drupal 7

User interface changes

- None, commandline only. UI change can be follow-up

API changes

- None

🌱 Plan
Status

Needs work

Version

11.0 🔥

Component
Simpletest 

Last updated 26 days ago

Created by

🇩🇪Germany Fabianx

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024