You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "dugenkui03 (GitHub)" <gi...@apache.org> on 2018/10/09 10:19:19 UTC
[GitHub] [incubator-dubbo] dugenkui03 commented on issue #2610: 优化 LRUCache读取性能
> > should we try out ReadWriteLock if semaphore has problem?
>
> Yes, we can. I considered ReadWriteLock, it seems the same effect with semaphore.
> I will help him to fix ci problem.
thx,replace ReentrantLock with ReadWriteLock is easy,i finished this noon.tough part is performance tests,because i need to consider the effects of the gc、jit especially the hit rate.details in [here](https://github.com/dugenkui03/blog/blob/master/todo/%E8%AF%BB%E5%86%99%E9%94%81.md).
failed in designing of the perfect solution,[this simple demo](https://github.com/dugenkui03/java-source-code/blob/master/src/test/java/dubbo/cache/Performance.java) can demonstrate that ReadWriteLock is faster than ReentrantLock .i have add some functional tests in [PR](https://github.com/apache/incubator-dubbo/pull/2627).
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2610 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org