HBASE-21657, Most subclass of Cell has a cached serialized size (Except those cells with tags), so I think most of the KeyValueUtil#length can be replaced by cell#getSerializedSize. Such as:
- KeyValueUtil.length in StoreFlusher#performFlush;
- KeyValueUtil.length in Compactor#performCompaction ;
and so on..
Will prepare a patch for this.