You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Tyler Hobbs (JIRA)" <ji...@apache.org> on 2016/07/08 17:47:11 UTC
[jira] [Updated] (CASSANDRA-12153) RestrictionSet.hasIN() is slow
[ https://issues.apache.org/jira/browse/CASSANDRA-12153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tyler Hobbs updated CASSANDRA-12153:
------------------------------------
Reviewer: Benjamin Lerer
Status: Patch Available (was: Open)
Patch and pending CI runs:
||branch||testall||dtest||
|[CASSANDRA-12153|https://github.com/thobbs/cassandra/tree/CASSANDRA-12153]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-12153-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-12153-dtest]|
I also replaced {{hasOnlyEqualityRestrictions()}} with a simple for-loop while I was at it.
> RestrictionSet.hasIN() is slow
> ------------------------------
>
> Key: CASSANDRA-12153
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12153
> Project: Cassandra
> Issue Type: Improvement
> Components: Coordination
> Reporter: Tyler Hobbs
> Assignee: Tyler Hobbs
> Priority: Minor
> Fix For: 3.x
>
>
> While profiling local in-memory reads for CASSANDRA-10993, I noticed that {{RestrictionSet.hasIN()}} was responsible for about 1% of the time. It looks like it's mostly slow because it creates a new LinkedHashSet (which is expensive to init) and uses streams. This can be replaced with a simple for loop.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)