[JBoss JIRA] Created: (JBCACHE-1322) Optimise Fqn class for performance in equals() and hashcode()
by Manik Surtani (JIRA)
Optimise Fqn class for performance in equals() and hashcode()
-------------------------------------------------------------
Key: JBCACHE-1322
URL: http://jira.jboss.com/jira/browse/JBCACHE-1322
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Manik Surtani
Assigned To: Manik Surtani
Fix For: 2.2.0.GA
A part of this will be to mark all constructors as @Deprecated and make them all private (or protected?) in 3.0.0. Provide adequate factory methods that would create Fqns.
The main benefit is that we can intern Fqns and not have to construct them each time.
Other improvements are a link to the parent and the current "name", rather than the whole list of elements. Hashcodes and equals can be calculated quickly this way, and caching hashcodes/equality tests based on identity become a possibility.
Other suggestions in design forum thread.
--
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
17 years, 11 months
[JBoss JIRA] Resolved: (JBCACHE-611) Optimize modification list before replication
by Manik Surtani (JIRA)
[ https://jira.jboss.org/jira/browse/JBCACHE-611?page=com.atlassian.jira.pl... ]
Manik Surtani resolved JBCACHE-611.
-----------------------------------
Resolution: Won't Fix
> Optimize modification list before replication
> ---------------------------------------------
>
> Key: JBCACHE-611
> URL: https://jira.jboss.org/jira/browse/JBCACHE-611
> Project: JBoss Cache
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Replication
> Affects Versions: 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4beta, 1.2.4, 1.2.4SP1, 1.2.4SP2, 1.3.0.GA, 1.3.0.SP1
> Reporter: Bela Ban
> Assignee: Mircea Markus
> Fix For: 3.0.0.GA
>
>
> When we use transactions, all modifications (PUT,REMOVE) are bundled (keyed by TX-ID) and replicated on TX commit.
> This is very inefficient if (a) we have many modifications in the TX scope and (b) if the modifications touched the same parts of the cache over and over again.
> We need to optimize the modification list before replication. (This maybe enabled/disabled via an attribute).
> Example: put(a/b/c) --> put(/a/b/c/d) --> remove(/a/b/c) --> put(a/b/c) should simply result in a PUT modification with *all* of the attributes of /a/b/c, so 1 modification instead of 4 !
> A general algorithm might be:
> - Maintain a dirty-node map Map<FQN, status>) (= "dirty", "removed")
> - On a put(FQN): add or set FQN to the map, set status="dirty"
> - On a remove(FQN): set FQN in map to "removed", needs to mark all subnodes as well, so maybe the dirty-node map needs to be
> a tree...
> We might get rid of *constructing the modification lists during modifications*, and only populate the dirty-node map. The modification list could only be created at *TX commit time*, from the dirty-node map, e.g in the above example: PUT(a/b/c).
> This only applies to pessimistic locking (does it ? can't we optimize optimistic locking in similar ways ?)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months
[JBoss JIRA] Commented: (JBCACHE-611) Optimize modification list before replication
by Manik Surtani (JIRA)
[ https://jira.jboss.org/jira/browse/JBCACHE-611?page=com.atlassian.jira.pl... ]
Manik Surtani commented on JBCACHE-611:
---------------------------------------
We decided that this was unnecesarily expensive (walking the mod list, matching cancelling entries) for little gain if in the end cancelling entries are only found infrequently in a given tx.
> Optimize modification list before replication
> ---------------------------------------------
>
> Key: JBCACHE-611
> URL: https://jira.jboss.org/jira/browse/JBCACHE-611
> Project: JBoss Cache
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Replication
> Affects Versions: 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4beta, 1.2.4, 1.2.4SP1, 1.2.4SP2, 1.3.0.GA, 1.3.0.SP1
> Reporter: Bela Ban
> Assignee: Mircea Markus
> Fix For: 3.0.0.GA
>
>
> When we use transactions, all modifications (PUT,REMOVE) are bundled (keyed by TX-ID) and replicated on TX commit.
> This is very inefficient if (a) we have many modifications in the TX scope and (b) if the modifications touched the same parts of the cache over and over again.
> We need to optimize the modification list before replication. (This maybe enabled/disabled via an attribute).
> Example: put(a/b/c) --> put(/a/b/c/d) --> remove(/a/b/c) --> put(a/b/c) should simply result in a PUT modification with *all* of the attributes of /a/b/c, so 1 modification instead of 4 !
> A general algorithm might be:
> - Maintain a dirty-node map Map<FQN, status>) (= "dirty", "removed")
> - On a put(FQN): add or set FQN to the map, set status="dirty"
> - On a remove(FQN): set FQN in map to "removed", needs to mark all subnodes as well, so maybe the dirty-node map needs to be
> a tree...
> We might get rid of *constructing the modification lists during modifications*, and only populate the dirty-node map. The modification list could only be created at *TX commit time*, from the dirty-node map, e.g in the above example: PUT(a/b/c).
> This only applies to pessimistic locking (does it ? can't we optimize optimistic locking in similar ways ?)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months