[jbosscache-issues] [JBoss JIRA] Created: (JBCACHE-1442) Improve performance with "Cache.setData" call

Elias Ross (JIRA) jira-events at lists.jboss.org
Thu Nov 6 15:45:36 EST 2008


Improve performance with "Cache.setData" call
---------------------------------------------

                 Key: JBCACHE-1442
                 URL: https://jira.jboss.org/jira/browse/JBCACHE-1442
             Project: JBoss Cache
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
            Reporter: Elias Ross
            Assignee: Manik Surtani



For a configuration that uses an async cache loader in 3.0, performance of "put(Map m)" may be unexpectedly slow. This is because put(Map) is a merge call and always results in a load. Imagine if put(Map) is being done over the network, e.g. JDBC database. This is not want users would expect. And there's no alternative to this in the current API set. (The work-around is to have cache calls done using a thread pool...)

Cache.getNode(X).replaceAll() won't work as it results in a load, and/or a null pointer exception if the node is not found.

The old TreeCache from 1.4 had a "put erase" option. I suggest we create a setData() method that does not do a merge.

Changes are attached, with some new tests, but I'm not sure the implementation is really complete. The tests set "goals" for the proper behavior of the cache loader.



-- 
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

        



More information about the jbosscache-issues mailing list