Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Speedup tests by caching HomeServerConfig instances #15284

Merged
merged 9 commits into from
Apr 18, 2023

Commits on Mar 19, 2023

  1. Speedup tests by caching HomeServerConfig instances

    These two lines:
    
    ```
    config_obj = HomeServerConfig()
    config_obj.parse_config_dict(config, "", "")
    ```
    
    are called many times with the exact same value for `config`.
    
    As the test suite is CPU-bound and non-negligeably time is spent in
    `parse_config_dict`, this saves ~5% on the overall runtime of the Trial
    test suite (tested with both `-j2` and `-j12` on a 12t CPU).
    
    This is sadly rather limited, as the cache cannot be shared between
    processes (it contains at least jinja2.Template and RLock objects which
    aren't pickleable), and Trial tends to run close tests in different
    processes.
    progval committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    743af2e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22865fa View commit details
    Browse the repository at this point in the history
  3. Fix changelog id

    progval committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    a4027d4 View commit details
    Browse the repository at this point in the history
  4. Re-run linters

    progval committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    64e9d5d View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2023

  1. Fix py <3.7 support

    progval committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    02bcd46 View commit details
    Browse the repository at this point in the history
  2. Simplify typing

    progval committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    11f78e8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dd086ad View commit details
    Browse the repository at this point in the history
  4. Remove unused imports

    progval committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    4e589d3 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. Configuration menu
    Copy the full SHA
    813dc8a View commit details
    Browse the repository at this point in the history