Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise RepositorySystem usage #1737

Open
timja opened this issue Sep 24, 2024 · 0 comments
Open

Optimise RepositorySystem usage #1737

timja opened this issue Sep 24, 2024 · 0 comments

Comments

@timja
Copy link
Member

timja commented Sep 24, 2024

          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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant