Bret McGuire created CASSJAVA-99:
------------------------------------

             Summary: See if we can improve on DefaultCodecRegistry.CacheKey
                 Key: CASSJAVA-99
                 URL: https://issues.apache.org/jira/browse/CASSJAVA-99
             Project: Apache Cassandra Java driver
          Issue Type: Improvement
          Components: Core
            Reporter: Bret McGuire


Came up in conversation around [the recent 
PR|https://github.com/apache/cassandra-java-driver/pull/1988] to minimize 
excess object allocation from varargs usage in the same code.  As part of that 
conversation it was pointed out that we're creating CacheKeys for every 
addition to the cache {_}and for every lookup{_}.  We need to do a lookup for 
every field of every row we're decoding so there's _a lot_ of object churn 
coming out of this.

 

The complication here is that we need to look up codecs based on three 
independent criteria:

 
 * The underlying CQL type
 * The target Java type
 * The question of covariance

 

This is currently implemented via CacheKey with consideration of all three of 
these values in hashCode().  But while working on this ticket I couldn't help 
but think that there has to be a better way to manage this lookup.  This ticket 
is intended to address that issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to