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

Saranya Krishnakumar commented on CASSSIDECAR-355:
--------------------------------------------------

+1 Thanks Lgtm

> Avoid creating objects in the CassandraAdapter implementation
> -------------------------------------------------------------
>
>                 Key: CASSSIDECAR-355
>                 URL: https://issues.apache.org/jira/browse/CASSSIDECAR-355
>             Project: Sidecar for Apache Cassandra
>          Issue Type: Bug
>          Components: Performance
>            Reporter: Francisco Guerrero
>            Assignee: Francisco Guerrero
>            Priority: Major
>             Fix For: 0.3
>
>         Attachments: PastedGraphic-1.png
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> We need to avoid re-recreating internal objects used by the adapter every 
> time we use them. There’s no need to recreate them, and we are losing some 
> cached values which we need to recompute on every request. One outstanding 
> example is recomputing the value for the 
> {{org.apache.cassandra.sidecar.adapters.base.CassandraStorageOperations#dataFileLocations}}
>  which is supposed to remain cached, but because we are creating the 
> {{org.apache.cassandra.sidecar.adapters.base.CassandraStorageOperations}} 
> object every time the 
> {{org.apache.cassandra.sidecar.adapters.base.CassandraAdapter#storageOperations}}
>  method is called, we are not actually effectively gaining anything.
> We can actually see some of these issues show up in flamegraphs taking up a 
> non-insignificant amount of CPU.



--
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