Skip to content
Snippets Groups Projects
Commit 2b8ce87b authored by Antoine Lambert's avatar Antoine Lambert
Browse files

config: Add LRU cache to get_swh_backend_* functions

I noticed tests in other SWH packages were really slow to execute
since recently and it turned out that the root cause of these
slowdowns is that pytest fixtures like the swh_storage one end up
calling the get_swh_backend_module from swh.core.config.

As that function reads Python package entry points from disk, this
slows down tests execution as it is called before each test using
a fixture as described above.

So add LRU cache to these functions to restore previous execution
times in SWH package tests.
parent bce777a2
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment