Inefficient indexOf called inside of CopyOnWriteArrayList$COWSubList.remove(Object)

Сергей Цыпанов sergei.tsypanov at yandex.ru
Tue Mar 27 20:41:06 UTC 2018


Thanks!

26.03.2018, 20:58, "Martin Buchholz" <martinrb at google.com>:
> I filed
> https://bugs.openjdk.java.net/browse/JDK-8200258
> and added comment:
>
> I agree that CopyOnWriteArrayList subList code can be improved.
> We should stop subclassing AbstractList.
> We should add more tests.
> We should have more guidance about when to use index-based API - only when quiescent or thread-confined. Explain how to most efficiently create a snapshot - probably
>  snapshot = new CopyOnWriteArrayList(sharedCOWAL)


More information about the core-libs-dev mailing list