Skip to content

Commit 04060ab

Browse files
committed
Bug 37080860 - [37080702->25.03] Remove InFilter optimization due to change to partitioned indices
[git-p4: depot-paths = "//dev/coherence-ce/main/": change = 111486]
1 parent dc83fa9 commit 04060ab

File tree

1 file changed

+0
-31
lines changed
  • prj/coherence-core/src/main/java/com/tangosol/util/filter

1 file changed

+0
-31
lines changed

prj/coherence-core/src/main/java/com/tangosol/util/filter/InFilter.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -157,37 +157,6 @@ else if (index.getIndexContents().isEmpty())
157157
{
158158
Map<E, Set<?>> mapContents = index.getIndexContents();
159159
Set<? extends E> colValues = getValue();
160-
int cValues = colValues.size();
161-
int cKeys = setKeys.size();
162-
163-
// an empirically chosen factor that suits 90% of the data sets
164-
// tested; the aim is to accommodate for common use cases in which
165-
// colValues will contain between 10 - 1000 elements, thus iterating
166-
// 128000 keys (upper bound) is considered the inflection point and
167-
// as setKeys increases past this point, the value of collecting the
168-
// inverse keys becomes more beneficial
169-
final int FACTOR = 128;
170-
171-
// optimized branch for relatively small number of keys
172-
use_fwd_index:
173-
if (cKeys < Math.min(1000, cValues) * FACTOR)
174-
{
175-
for (Iterator iter = setKeys.iterator(); iter.hasNext(); )
176-
{
177-
Object oValue = index.get(iter.next());
178-
if (oValue == MapIndex.NO_VALUE)
179-
{
180-
// forward index is not supported
181-
break use_fwd_index;
182-
}
183-
184-
if (!colValues.contains(oValue))
185-
{
186-
iter.remove();
187-
}
188-
}
189-
return null;
190-
}
191160

192161
List<Set<?>> listInverseKeys = new ArrayList<>(colValues.size());
193162
for (E value : colValues)

0 commit comments

Comments
 (0)