Re: Why is old IO API used in maven resolver?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Why is old IO API used in maven resolver?

Romain Manni-Bucau
Did you test the newer Files.copy?

It seems to use a plain char[] forwarding impl too ([1]) vs the sendfile64
of the channel impl ([2]).
Also did you try with some Gigs files? IIRC sendfile had a limitation of a
few gigas - and we sadly have artifacts of > 4G even if rare.
That said if the size is available it can be tested and the optimization
used quite easily I guess.

[1]
https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/java.base/unix/native/libnio/fs/UnixCopyFile.c#L53
[2]
https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/java.base/unix/native/libnio/ch/FileChannelImpl.c#L135

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le mer. 19 août 2020 à 14:35, Markus KARG <[hidden email]> a écrit :

> I do not support your judgement. That bug you mention was fixed nine years
> ago, so even the most exotic platforms should have adopted the fix
> meanwhile. This IS reliable and not more nor less buggy than any other part
> of the JRE. What we should do is give intensive tensting of Stefan's PR,
> but not overhastily abstain from it due to FUD. As a long time user of NIO
> API on Windows and Linux (speaking of years here) I strongly believe that
> the performance benefits will definitively outweigh the potential risks.
> -Markus
>
> -----Ursprüngliche Nachricht-----
> Von: Jochen Wiedmann [mailto:[hidden email]]
> Gesendet: Mittwoch, 19. August 2020 13:05
> An: Maven Developers List
> Betreff: Re: Why is old IO API used in maven resolver?
>
> On Wed, Aug 19, 2020 at 11:49 AM Michael Osipov <[hidden email]>
> wrote:
> >
> > Am 2020-08-19 um 11:27 schrieb Jochen Wiedmann:
> > > Looking at
> > >
> > >      https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6822107
> > >
> > > I would very much like us to abstain from every attempt to go into the
> > > direction, that Stefan suggests. The consequence could be, that we
> > > need to bother with exotic corner cases. Let's stay simple, but
> > > reliable.
> >
> >
> > You proposal is not to change the code at all?
>
> If it's working fine: Yes.
>
> --
>
> Look, that's why there's rules, understand? So that you think before
> you break 'em.
>
>     -- (Terry Pratchett, Thief of Time)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>