You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Bryant Luk (JIRA)" <ji...@apache.org> on 2009/09/16 19:15:57 UTC
[jira] Created: (WINK-190) Performance change for SoftConcurrentMap
Performance change for SoftConcurrentMap
----------------------------------------
Key: WINK-190
URL: https://issues.apache.org/jira/browse/WINK-190
Project: Wink
Issue Type: Improvement
Components: Common
Affects Versions: 0.2
Reporter: Bryant Luk
Assignee: Bryant Luk
Fix For: 0.2
Using a copy on write volatile cache instead of the re-entrant locks provides a good significant performance increase for SoftConcurrentMap.
The WeakHashMap will be a read only map when doing gets() and when a put()/clear() is made, the cache is copied first and then set as the new cache.
Patch in a few.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WINK-190) Performance change for SoftConcurrentMap
Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WINK-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryant Luk updated WINK-190:
----------------------------
Attachment: WINK-190.patch
See:
http://www.ibm.com/developerworks/java/library/j-jtp06197.html
for Pattern #5: The cheap read-write lock trick .
The current WeakHashMap is treated as a read only Map. Every time there's a modifying operation (put/clear), a copy is made to a new map.
This should keep the thread safe ok while also keeping the WeakHashMap for memory concerns.
> Performance change for SoftConcurrentMap
> ----------------------------------------
>
> Key: WINK-190
> URL: https://issues.apache.org/jira/browse/WINK-190
> Project: Wink
> Issue Type: Improvement
> Components: Common
> Affects Versions: 0.2
> Reporter: Bryant Luk
> Assignee: Bryant Luk
> Fix For: 0.2
>
> Attachments: WINK-190.patch
>
>
> Using a copy on write volatile cache instead of the re-entrant locks provides a good significant performance increase for SoftConcurrentMap.
> The WeakHashMap will be a read only map when doing gets() and when a put()/clear() is made, the cache is copied first and then set as the new cache.
> Patch in a few.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WINK-190) Performance change for SoftConcurrentMap
Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WINK-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryant Luk updated WINK-190:
----------------------------
Patch Info: [Patch Available]
> Performance change for SoftConcurrentMap
> ----------------------------------------
>
> Key: WINK-190
> URL: https://issues.apache.org/jira/browse/WINK-190
> Project: Wink
> Issue Type: Improvement
> Components: Common
> Affects Versions: 0.2
> Reporter: Bryant Luk
> Assignee: Bryant Luk
> Fix For: 0.2
>
> Attachments: WINK-190.patch
>
>
> Using a copy on write volatile cache instead of the re-entrant locks provides a good significant performance increase for SoftConcurrentMap.
> The WeakHashMap will be a read only map when doing gets() and when a put()/clear() is made, the cache is copied first and then set as the new cache.
> Patch in a few.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WINK-190) Performance change for
SoftConcurrentMap
Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WINK-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756396#action_12756396 ]
Michael Elman commented on WINK-190:
------------------------------------
Interesting!
What does the performance tests show? How much is it faster in our cases?
> Performance change for SoftConcurrentMap
> ----------------------------------------
>
> Key: WINK-190
> URL: https://issues.apache.org/jira/browse/WINK-190
> Project: Wink
> Issue Type: Improvement
> Components: Common
> Affects Versions: 0.2
> Reporter: Bryant Luk
> Assignee: Bryant Luk
> Fix For: 0.2
>
> Attachments: WINK-190.patch
>
>
> Using a copy on write volatile cache instead of the re-entrant locks provides a good significant performance increase for SoftConcurrentMap.
> The WeakHashMap will be a read only map when doing gets() and when a put()/clear() is made, the cache is copied first and then set as the new cache.
> Patch in a few.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WINK-190) Performance change for
SoftConcurrentMap
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WINK-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756771#action_12756771 ]
Hudson commented on WINK-190:
-----------------------------
Integrated in Wink-Trunk-JDK1.5 #161 (See [http://hudson.zones.apache.org/hudson/job/Wink-Trunk-JDK1.5/161/])
Volatile copy on write map for SoftConcurrentMap
Thanks to Doug Larson for the suggestion and
profiling work.
See []
> Performance change for SoftConcurrentMap
> ----------------------------------------
>
> Key: WINK-190
> URL: https://issues.apache.org/jira/browse/WINK-190
> Project: Wink
> Issue Type: Improvement
> Components: Common
> Affects Versions: 0.2
> Reporter: Bryant Luk
> Assignee: Bryant Luk
> Fix For: 0.2
>
> Attachments: WINK-190.patch
>
>
> Using a copy on write volatile cache instead of the re-entrant locks provides a good significant performance increase for SoftConcurrentMap.
> The WeakHashMap will be a read only map when doing gets() and when a put()/clear() is made, the cache is copied first and then set as the new cache.
> Patch in a few.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WINK-190) Performance change for
SoftConcurrentMap
Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WINK-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756595#action_12756595 ]
Bryant Luk commented on WINK-190:
---------------------------------
3% for just changing over the current implementation as is. There are a few other areas that could re-use this SoftConcurrentMap potentially but using this as the core cache code first.
> Performance change for SoftConcurrentMap
> ----------------------------------------
>
> Key: WINK-190
> URL: https://issues.apache.org/jira/browse/WINK-190
> Project: Wink
> Issue Type: Improvement
> Components: Common
> Affects Versions: 0.2
> Reporter: Bryant Luk
> Assignee: Bryant Luk
> Fix For: 0.2
>
> Attachments: WINK-190.patch
>
>
> Using a copy on write volatile cache instead of the re-entrant locks provides a good significant performance increase for SoftConcurrentMap.
> The WeakHashMap will be a read only map when doing gets() and when a put()/clear() is made, the cache is copied first and then set as the new cache.
> Patch in a few.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WINK-190) Performance change for
SoftConcurrentMap
Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WINK-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryant Luk resolved WINK-190.
-----------------------------
Resolution: Fixed
Patch applied. Thanks to Doug Larson for suggestions and the performance profiling work.
> Performance change for SoftConcurrentMap
> ----------------------------------------
>
> Key: WINK-190
> URL: https://issues.apache.org/jira/browse/WINK-190
> Project: Wink
> Issue Type: Improvement
> Components: Common
> Affects Versions: 0.2
> Reporter: Bryant Luk
> Assignee: Bryant Luk
> Fix For: 0.2
>
> Attachments: WINK-190.patch
>
>
> Using a copy on write volatile cache instead of the re-entrant locks provides a good significant performance increase for SoftConcurrentMap.
> The WeakHashMap will be a read only map when doing gets() and when a put()/clear() is made, the cache is copied first and then set as the new cache.
> Patch in a few.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WINK-190) Performance change for SoftConcurrentMap
Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WINK-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryant Luk closed WINK-190.
---------------------------
> Performance change for SoftConcurrentMap
> ----------------------------------------
>
> Key: WINK-190
> URL: https://issues.apache.org/jira/browse/WINK-190
> Project: Wink
> Issue Type: Improvement
> Components: Common
> Affects Versions: 0.2
> Reporter: Bryant Luk
> Assignee: Bryant Luk
> Fix For: 0.2
>
> Attachments: WINK-190.patch
>
>
> Using a copy on write volatile cache instead of the re-entrant locks provides a good significant performance increase for SoftConcurrentMap.
> The WeakHashMap will be a read only map when doing gets() and when a put()/clear() is made, the cache is copied first and then set as the new cache.
> Patch in a few.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.