6 Replies Latest reply on Oct 31, 2007 5:41 AM by Mircea Markus

    JBCACHE-1153 - structural nodes

    Mircea Markus Master

      this jira is about not considering the structural nodes for eviction. This performance optimisation makes sense considering that nothing can be evicted from those nodes as they don't have an attribute map, but the eviction events are created, processed, etc(also interceptor stack when passivation is on).
      Now, considering how eviction curently works, I think things can be optimized even more: by ignoring all the nodes that have empty attribute maps from eviction (this includes the prev defined structural nodes). By ignoring them from eviction I mean not generating eviction events on access on those nodes. Even at this point, when Cache.evict(fqn) is called on such an empty node, the impl works as follows:
      a) fqn is NOT eaf, then then empty the attribute map
      b) node is leaf, then remove it entirelly.

      In the case of a) for empty nodes nothing really happens. Though when this call is performed some eviction events got processed, which is not necessary
      I think the case of b should be preserved though, as keeping empty paths is not optimal.
      So the optimisation would rather be: don't consider empty, not-leafs nodes for eviction.