Re: RFR: 8263561: Re-examine uses of LinkedList [v6]

2021-08-02 Thread Сергей Цыпанов
> After I've renamed remove branch GitHub for some reason has closed original > https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: -

Re: RFR: 8263561: Re-examine uses of LinkedList [v5]

2021-08-02 Thread Claes Redestad
On Mon, 26 Jul 2021 08:27:20 GMT, Сергей Цыпанов wrote: >> After I've renamed remove branch GitHub for some reason has closed original >> https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. > > Сергей Цыпанов has updated the pull request with a new target base due to a >

Re: RFR: 8263561: Re-examine uses of LinkedList [v5]

2021-07-26 Thread Сергей Цыпанов
> After I've renamed remove branch GitHub for some reason has closed original > https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: -

Re: RFR: 8263561: Re-examine uses of LinkedList [v4]

2021-07-08 Thread Сергей Цыпанов
> After I've renamed remove branch GitHub for some reason has closed original > https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: -

Re: RFR: 8263561: Re-examine uses of LinkedList [v3]

2021-06-30 Thread Сергей Цыпанов
> After I've renamed remove branch GitHub for some reason has closed original > https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:

Re: RFR: 8263561: Re-examine uses of LinkedList [v2]

2021-06-04 Thread Сергей Цыпанов
> After I've renamed remove branch GitHub for some reason has closed original > https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:

RFR: 8263561: Re-examine uses of LinkedList

2021-06-02 Thread Сергей Цыпанов
After I've renamed remove branch GitHub for some reason has closed original https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. - Commit messages: - Merge branch 'master' into 8263561 - Merge branch 'master' into purge-linked-list - 8263561: Use sized

Re: RFR: 8263561: Re-examine uses of LinkedList [v4]

2021-05-25 Thread Сергей Цыпанов
> The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The

Re: RFR: 8263561: Re-examine uses of LinkedList [v3]

2021-05-25 Thread Сергей Цыпанов
> The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok Сергей Цыпанов has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8263561: Re-examine uses of LinkedList [v2]

2021-05-25 Thread Сергей Цыпанов
> The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok Сергей Цыпанов has refreshed the contents of this pull request, and previous commits have been removed. The

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-24 Thread liach
On Mon, 24 May 2021 10:13:55 GMT, Сергей Цыпанов wrote: >> But don't people access these internal code at their own risk, as jdk may >> change these code at any time without notice? > > True, I just wonder whether it's OK to change internals when we know for sure > that this breaks 3rd party

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-24 Thread Сергей Цыпанов
On Mon, 24 May 2021 09:25:08 GMT, liach wrote: >> Should we then revert the changes to `JarIndex`? > > But don't people access these internal code at their own risk, as jdk may > change these code at any time without notice? True, I just wonder whether it's OK to change internals when we know

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-24 Thread liach
On Mon, 24 May 2021 07:13:29 GMT, Сергей Цыпанов wrote: >> Just for completeness, they're using the add-exports: >> https://github.com/AdoptOpenJDK/IcedTea-Web/blob/master/launchers/itw-modularjdk.args#L19 > > Should we then revert the changes to `JarIndex`? But don't people access these

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-24 Thread Сергей Цыпанов
On Fri, 21 May 2021 15:12:20 GMT, Thiago Henrique Hüpner wrote: >>> IcedTea-Web seems to be using this method reflectively: >>> https://github.com/AdoptOpenJDK/IcedTea-Web/blob/master/common/src/main/java/net/adoptopenjdk/icedteaweb/jdk89access/JarIndexAccess.java#L80 >> >> I assume this

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-24 Thread Сергей Цыпанов
On Fri, 21 May 2021 14:18:16 GMT, Daniel Fuchs wrote: >> The usage of `LinkedList` is senseless and can be replaced with either >> `ArrayList` or `ArrayDeque` which are both more compact and effective. >> >> jdk:tier1 and jdk:tier2 are both ok > >

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-24 Thread Сергей Цыпанов
On Fri, 21 May 2021 14:15:53 GMT, Daniel Fuchs wrote: >> The usage of `LinkedList` is senseless and can be replaced with either >> `ArrayList` or `ArrayDeque` which are both more compact and effective. >> >> jdk:tier1 and jdk:tier2 are both ok > >

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-21 Thread Maurizio Cimadamore
On Fri, 21 May 2021 14:22:47 GMT, Daniel Fuchs wrote: >> The usage of `LinkedList` is senseless and can be replaced with either >> `ArrayList` or `ArrayDeque` which are both more compact and effective. >> >> jdk:tier1 and jdk:tier2 are both ok > > I don't remember all the comments you have

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-21 Thread Thiago Henrique Hüpner
On Fri, 21 May 2021 15:00:15 GMT, Alan Bateman wrote: >> src/java.base/share/classes/jdk/internal/util/jar/JarIndex.java line 154: >> >>> 152: * @param fileName the key of the mapping >>> 153: */ >>> 154: public List get(String fileName) { >> >> IcedTea-Web seems to be using this

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-21 Thread Alan Bateman
On Fri, 21 May 2021 14:52:21 GMT, Thiago Henrique Hüpner wrote: > IcedTea-Web seems to be using this method reflectively: > https://github.com/AdoptOpenJDK/IcedTea-Web/blob/master/common/src/main/java/net/adoptopenjdk/icedteaweb/jdk89access/JarIndexAccess.java#L80 I assume this doesn't work

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-21 Thread Thiago Henrique Hüpner
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-21 Thread Alan Bateman
On Fri, 21 May 2021 13:13:04 GMT, Сергей Цыпанов wrote: > Hi guys, any more comments here? Please ping me if I've missed something I suspect this will require renaming some fields and changing comments, e.g. requestList is no longer a good name for the field in AbstractPoller, its comments

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-21 Thread Daniel Fuchs
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok I don't remember all the comments you have

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-21 Thread Сергей Цыпанов
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok Hi guys, any more comments here? Please ping me if

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-04-08 Thread Сергей Цыпанов
On Mon, 15 Mar 2021 06:56:00 GMT, Alan Bateman wrote: >> Nothing outside of the JDK should be hacking into this private field of a >> non-exposed class, this should not be a concern here. > >> @AlanBateman so is it ok to keep `ArrayLists`? > > One thing to look out for is usages of 2-arg add

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-15 Thread Alan Bateman
On Sun, 14 Mar 2021 17:26:07 GMT, Alan Bateman wrote: >> Looks like it's never specified in JavaDoc which particular implementation >> of List is used in fields of affected classes, so it's quite odd to me that >> someone would rely on that when using reflection. But your point about >>

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Сергей Цыпанов
On Sun, 14 Mar 2021 17:26:07 GMT, Alan Bateman wrote: >> Looks like it's never specified in JavaDoc which particular implementation >> of List is used in fields of affected classes, so it's quite odd to me that >> someone would rely on that when using reflection. But your point about >>

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Alan Bateman
On Sun, 14 Mar 2021 17:18:11 GMT, Сергей Цыпанов wrote: >> If that's the only use case, I recommend changing the return type to a >> deque, and replace the linked list with an array deque instead (as done >> elsewhere in this pr) > > Looks like it's never specified in JavaDoc which particular

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Сергей Цыпанов
On Sun, 14 Mar 2021 15:02:03 GMT, liach wrote: >> src/java.base/share/classes/jdk/internal/loader/URLClassPath.java line 220: >> >>> 218: return Collections.emptyList(); >>> 219: } >>> 220: List result = new ArrayList<>(); >> >> We'd better be cautious about this

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread liach
On Sun, 14 Mar 2021 14:58:11 GMT, Yi Yang wrote: >> The usage of `LinkedList` is senseless and can be replaced with either >> `ArrayList` or `ArrayDeque` which are both more compact and effective. >> >> jdk:tier1 and jdk:tier2 are both ok > >

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Сергей Цыпанов
On Fri, 26 Feb 2021 15:32:57 GMT, liach wrote: > Are linked lists worse for addition even in cases where addition to array > list or deque requires resize and copying? i thought that's the advantage of > linked list. As far as I know `LinkedList` is always worse than `ArrayList` and

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Yi Yang
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread liach
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok Are linked lists worse for addition even in cases

RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Сергей Цыпанов
The usage of `LinkedList` is senseless and can be replaced with either `ArrayList` or `ArrayDeque` which are both more compact and effective. jdk:tier1 and jdk:tier2 are both ok - Commit messages: - Remove remaining usages of LinkedList in java.base Changes: