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.
Loading
Please register or sign in to comment