Re: Thread safety of RepositorySystem.resolveArtifact()
Well, you know, but bf does exactly that: paralell pom downloading and fast(er) processing of graph, and resolver downloads jars already in parallel. So unsure what you want to paralellize, but if you have plugins for it, that's fine too T On Fri, May 26, 2023, 19:46 Václav Haisman wrote: > On 26. 05. 23 14:26, Tamás Cservenák wrote: > > Howdy, > > > > yes, it should be possible, it is meant to be thread safe once > constructed. > > How did you intend session handling? One session for all, or have > sessions > > per thread? > > I am just using the one RepositorySystemSession that a Maven plugin has > access to. I don't even know if/how I would get another session. > > > > > Also, unsure what you want to "speed up", but resolver itself also uses > > thread pools, so maybe better to look into those? > > I need to download about a hundred of ~200 MB artifacts that I have to > extract and analyze their content for our application. I have a custom > maven plugin for this. It takes tens of seconds to analyze the content > once downloaded, so I am trying to parallelize this. > > > Like new "bf" collector and related (threading) settings, etc > > https://maven.apache.org/resolver/configuration.html > > This is interesting but not applicable to my case, it seems. > > > > > > HTH > > T > > > > On Fri, May 26, 2023 at 2:16 PM Václav Haisman > wrote: > > > >> Hi. > >> > >> My Maven plugin calls this.repoSystem.resolveArtifact(this.repoSession, > >> resolutionRequest);. Now, to speed things up, I would like to call it in > >> parallel in multiple threads with different artifacts. Is it possible to > >> use resolveArtifact() from multiple threads on the same RepositorySystem > >> instance? > >> > > > -- > VH > >
Re: Thread safety of RepositorySystem.resolveArtifact()
On 26. 05. 23 14:26, Tamás Cservenák wrote: Howdy, yes, it should be possible, it is meant to be thread safe once constructed. How did you intend session handling? One session for all, or have sessions per thread? I am just using the one RepositorySystemSession that a Maven plugin has access to. I don't even know if/how I would get another session. Also, unsure what you want to "speed up", but resolver itself also uses thread pools, so maybe better to look into those? I need to download about a hundred of ~200 MB artifacts that I have to extract and analyze their content for our application. I have a custom maven plugin for this. It takes tens of seconds to analyze the content once downloaded, so I am trying to parallelize this. Like new "bf" collector and related (threading) settings, etc https://maven.apache.org/resolver/configuration.html This is interesting but not applicable to my case, it seems. HTH T On Fri, May 26, 2023 at 2:16 PM Václav Haisman wrote: Hi. My Maven plugin calls this.repoSystem.resolveArtifact(this.repoSession, resolutionRequest);. Now, to speed things up, I would like to call it in parallel in multiple threads with different artifacts. Is it possible to use resolveArtifact() from multiple threads on the same RepositorySystem instance? -- VH
Re: Thread safety of RepositorySystem.resolveArtifact()
Howdy, yes, it should be possible, it is meant to be thread safe once constructed. How did you intend session handling? One session for all, or have sessions per thread? Also, unsure what you want to "speed up", but resolver itself also uses thread pools, so maybe better to look into those? Like new "bf" collector and related (threading) settings, etc https://maven.apache.org/resolver/configuration.html HTH T On Fri, May 26, 2023 at 2:16 PM Václav Haisman wrote: > Hi. > > My Maven plugin calls this.repoSystem.resolveArtifact(this.repoSession, > resolutionRequest);. Now, to speed things up, I would like to call it in > parallel in multiple threads with different artifacts. Is it possible to > use resolveArtifact() from multiple threads on the same RepositorySystem > instance? > > -- > VH >
Thread safety of RepositorySystem.resolveArtifact()
Hi. My Maven plugin calls this.repoSystem.resolveArtifact(this.repoSession, resolutionRequest);. Now, to speed things up, I would like to call it in parallel in multiple threads with different artifacts. Is it possible to use resolveArtifact() from multiple threads on the same RepositorySystem instance? -- VH