Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

【Enhancement】优化主流程lookProcessChain方法 issue #3513

Open LilMosey opened this issue 9 months ago • 0 comments

Describe what this PR does / why we need it

issue #3513 (详细信息都在issue里)

Does this pull request fix one issue?

issue #3513

Describe how you did it

image

Describe how to verify it

实现逻辑参照Collections.synchronizedMap() image

Special notes for reviews

后续思考:

Image

当资源数限制(如 6000)放开后,或者可以允许超一点点去追求极致的性能的话,代码还可以进行如下优化: chainMap使用ConcurrentHashMap,不需要显示进行加锁,直接采用ConcurrentHashMap#computeIfAbsent方法,这样锁的粒度更小,性能更好。

Image

LilMosey avatar Mar 28 '25 13:03 LilMosey