Skip to content

Optimise RepositorySystem usage #1737

@timja

Description

@timja
          One more thing post merge @basil and @timja I just realized:

While debugging, I kinda saw that AetherModule is constructed twice (I may be wrong here) per test.

But in any case, I am pretty much sure that RepositorySystem is not being extended dynamically (as in added new transport, removed transport), so to me it seems likely possible you need one cached instance of RepositorySystem. There is no reason to build and then tear down it, as it is same. RepositorySystem is stateless, while RepositorySystemSession is not (!).

So I think your lengthy tests could be mildly improved, if you split the two: keep RepositorySystem across whole run (as it has huge object graph, but is stateless and you do not change it), but create RepositorySystemSession per-case basis.

Originally posted by @cstamas in #1733 (comment)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions