hsweb-framework icon indicating copy to clipboard operation
hsweb-framework copied to clipboard

[需求] Is better for FastBeanCopier change CACHE type to ConcurrentReferenceHashMap

Open Taoaozw opened this issue 3 years ago • 4 comments

f in a scenario where the key changes frequently,ConcurrentHashMap takes up a lot of invalid memory

Taoaozw avatar Dec 01 '21 08:12 Taoaozw

I don't think so ,Creating Copier is time-consuming, and using ConcurrentHashMap may speed up program crashes!

zhou-hao avatar Dec 01 '21 08:12 zhou-hao

I don't think so ,Creating Copier is time-consuming, and using ConcurrentHashMap may speed up program crashes!

emmm, maybe you say ConcurrentReferenceHashMap will speed up program crashes ? FastBeanCopier exactly use ConcurrentHashMap here ! You have a point, It's cost-effective to have high performance requirements ! But the situations of out-of-memory situations also need to be considered , is there can provider a choose . 截屏2021-12-01 下午4 51 49

Taoaozw avatar Dec 01 '21 08:12 Taoaozw

You are right , It should be configurable , can you pull request to do it ?

zhou-hao avatar Dec 01 '21 09:12 zhou-hao

Thanks for your invitation , i will try do this !

Taoaozw avatar Dec 01 '21 09:12 Taoaozw