[ 
https://issues.apache.org/jira/browse/CASSANDRA-21467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18099437#comment-18099437
 ] 

Francisco Guerrero commented on CASSANDRA-21467:
------------------------------------------------

Pushed the commit here: 
https://github.com/apache/cassandra/pull/4883/changes/d1af67495638442db737dc51e28f7201ff9632c0
 . I will start the merge now.

> Reduce allocations in DefaultQueryOptions
> -----------------------------------------
>
>                 Key: CASSANDRA-21467
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21467
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Local/Other
>            Reporter: Francisco Guerrero
>            Assignee: Francisco Guerrero
>            Priority: Low
>             Fix For: 6.x, 7.x
>
>
> In 
> {{org.apache.cassandra.cql3.QueryOptions.DefaultQueryOptions#readThresholds}} 
> we always create an instance of {{DefaultReadThresholds}} when read 
> thresholds are enabled. We can avoid the initialization by instead having a 
> static instance of {{DefaultReadThresholds}} and always reading the values 
> from {{DatabaseDescriptor}}. The estimated savings are ~32 bytes per request. 
> Every request when thresholds are enabled. The proposed solution is mirroring 
> the existing behavior when read thresholds are disabled.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to