apache / apache/fory

[Java] Optimize the copy performance of some thread-safe classes

Open
#1,776 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
4.5k
Forks
443
Avg merge
5h 59m
Merged PRs (30d)
77

Description

## Is your feature request related to a problem? Please describe.
Some thread-safe classes use a generic copyElements() method, for example: `CopyOnWriteArrayList`...
when adding elements, locking operations are performed, which is very time-consuming.

## Describe the solution you'd like
Optimize the performance of these copy classes

## Additional context

![image](https://github.com/user-attachments/assets/fcd746e0-0c5e-4e64-81d8-5c4643df3da5)
![image](https://github.com/user-attachments/assets/9519d32b-b542-4b22-b582-771eb0728df6)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.