Darrel Schneider created GEODE-1303:
---------------------------------------

             Summary: CqServiceImpl.processEntryEvent(CacheEvent, Profile, 
Profile[], FilterRoutingInfo)
                 Key: GEODE-1303
                 URL: https://issues.apache.org/jira/browse/GEODE-1303
             Project: Geode
          Issue Type: Improvement
          Components: offheap, querying
            Reporter: Darrel Schneider


Currently CqServerImpl.processEntryEvent copies each off-heap value it adds to 
cqUnfilteredEventsSet_newValue to the heap in this code:
      if (cqUnfilteredEventsSet_newValue.isEmpty() && 
(event.getOperation().isCreate() ||  event.getOperation().isUpdate())) {
        Object newValue = entryEvent.getNewValue(); // TODO OFFHEAP: optimize 
by not copying the value on to the heap
        if (newValue != null) {
          //We have a new value to run the query on
          cqUnfilteredEventsSet_newValue.add(newValue);
        }
      }
The cqUnfilteredEventsSet_newValue does not live past this method call. The 
values in it are later passed to evaluateQuery.

It would be nice if we didn't need to copy the values to the heap in this code. 
It would be easy enough to retain them and then release everything in 
cqUnfilteredEventsSet_newValue in a finally block. But can evaluateQuery handle 
an offheap reference? If so then this would be a nice optimization for cqs on 
offheap regions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to