1 Reply Latest reply on Jun 10, 2005 10:50 AM by Ben Wang

    Reduce frequency of calls to BoundedBuffer.size() in Region.

    Brian Dueck Newbie

      Hi;

      I've opened up an issue in Jira to request a change to reduce the freqency of calls to BoundedBuffer.size() in Region.putNodeEvent().

      http://jira.jboss.com/jira/browse/JBCACHE-190

      The problem is that BoundedBuffer.size() is not a cheap call - requires a lock acquisition - and since there is high contention for this object across threads, this leads to concurrency problems.

      I've attached an enhanced Region.java file that makes the call only once every 100 calls.

      Brian.