Skip to content

Commit

Permalink
[Performance] Full build takes more time since 2024-09 (type inference)
Browse files Browse the repository at this point in the history
strengthen optimization 1:
+ record only pairs where both types are parameterized

Fixes eclipse-jdt#3327
  • Loading branch information
stephan-herrmann committed Dec 3, 2024
1 parent 54e9217 commit dcff9f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ protected List<Pair<TypeBinding>> allSuperPairsWithCommonGenericType(TypeBinding
if (s == null || s.id == TypeIds.T_JavaLangObject || t == null || t.id == TypeIds.T_JavaLangObject)
return Collections.emptyList();
List<Pair<TypeBinding>> result = new ArrayList<>();
if ((s.isParameterizedType() || t.isParameterizedType()) // optimization #1: clients of this method only want to inspect type arguments
if (s.isParameterizedType() && t.isParameterizedType() // optimization #1: clients of this method only want to compare type arguments
&& TypeBinding.equalsEquals(s.original(), t.original())) {
result.add(new Pair<>(s, t));
}
Expand Down

0 comments on commit dcff9f1

Please sign in to comment.