[jboss-jira] [JBoss JIRA] Updated: (JBCACHE-1082) Optimise nodes for single elements
Vincent Marquez (JIRA)
jira-events at lists.jboss.org
Fri Jul 13 04:12:03 EDT 2007
[ http://jira.jboss.com/jira/browse/JBCACHE-1082?page=all ]
Vincent Marquez updated JBCACHE-1082:
-------------------------------------
Attachment: UnversionedNode.patch.txt
ReplicatedPojoPerfTest.java
Heres an example of UnversionedNode that only uses a map if neccessary. I tested it with the tests/perf unit tests, and it didn't have too much of a noticable impact. I did whip up a quick PojoCache performance test, (attached), which showed a pretty consistent 1 millisecond improvement for each attach/find for a simple pojo.
Hope this helps in the decision to go with this optimization or not.
> Optimise nodes for single elements
> ----------------------------------
>
> Key: JBCACHE-1082
> URL: http://jira.jboss.com/jira/browse/JBCACHE-1082
> Project: JBoss Cache
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 2.0.0.CR1
> Reporter: Manik Surtani
> Assigned To: Manik Surtani
> Fix For: 2.1.0.GA
>
> Attachments: ReplicatedPojoPerfTest.java, UnversionedNode.patch.txt
>
>
> Many use cases just place a single object in a Node. Rather than going through the memory and performance penalties of using Maps for a single entry, we should:
> 1) Create a reference to 2 Objects for key and value, as well as a Map.
> 2) Only initialise/construct the Map if Node.putAll() is called, or when Node.put() is called with a second key/value pair
> 3) Otherwise just hold the key/value pair as direct object refs.
> Would affect UnversionedNode and WorkspaceNodeImpl.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list