commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OGNL-20) Performance - Replace synchronized blocks with ReentrantReadWriteLock
Date Sun, 23 Oct 2011 23:30:32 GMT

    [ https://issues.apache.org/jira/browse/OGNL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133777#comment-13133777
] 

Hudson commented on OGNL-20:
----------------------------

Integrated in ognl #147 (See [https://builds.apache.org/job/ognl/147/])
    Added OGNL-20 in the issue list
OGNL-20 - Performance - Replace synchronized blocks with ReentrantReadWriteLock

mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1188001
Files : 
* /commons/proper/ognl/trunk/src/changes/changes.xml

mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1188000
Files : 
* /commons/proper/ognl/trunk
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTAdd.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTAnd.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTAssign.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTBitAnd.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTBitOr.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DefaultTypeConverter.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EvaluationPool.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ExpressionNode.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/MethodAccessor.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NodeVisitor.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ObjectArrayPool.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ObjectMethodAccessor.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ObjectPropertyAccessor.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/Ognl.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlOps.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/TypeConverter.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/enhance/ExpressionCompiler.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/Cache.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheException.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCache.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheHandler.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCache.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCacheFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapClassCache.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/Entry.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCache.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCacheFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapClassCache.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCache.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCacheFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockClassCache.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/CacheEntry.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/CacheEntryFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/ClassCacheEntryFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntryFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/FiedlCacheEntryFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeCacheEntry.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessCacheEntryFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessEntryValue.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntry.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntryFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodPermCacheEntryFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntry.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntryFactory.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PropertyDescriptorCacheEntryFactory.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/TestOgnlRuntime.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/ConcurrentHashMapCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/ConstructorCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/DeclaredMethodCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/FieldCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/GenericMethodParameterTypeCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/MethodAccessCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/MethodPermCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/PermissionCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/internal/PropertyDescriptorCacheTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ArrayElementsTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ContextVariableTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/IndexAccessTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/InterfaceInheritanceTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/LambdaExpressionTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/MethodWithConversionTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NestedMethodTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NullHandlerTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OperatorTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/Performance.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PrivateAccessorTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/QuotingTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/enhance/TestExpressionCompiler.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean1.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean2.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean3.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Root.java

                
> Performance - Replace synchronized blocks with ReentrantReadWriteLock
> ---------------------------------------------------------------------
>
>                 Key: OGNL-20
>                 URL: https://issues.apache.org/jira/browse/OGNL-20
>             Project: OGNL
>          Issue Type: Improvement
>         Environment: ALL
>            Reporter: Greg Lively
>            Assignee: Maurizio Cucchiara
>         Attachments: Bench Results.txt, Caching_Mechanism_Benchmarks.patch
>
>
> I've noticed a lot of synchronized blocks of code in OGNL. For the most part, these synchronized
blocks are controlling access to HashMaps, etc. I believe this could be done far better using
ReentrantReadWriteLocks. ReentrantReadWriteLock allows unlimited concurrent access, and single
threads only for writes. Perfect in an environment where the ratio of reads  is far higher
than writes; which is typically the scenario for caching. Plus the access control can be tuned
for reads and writes; not just a big synchronized{} wrapping a bunch of code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message