Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance] Full build takes more time since 2024-09 (type inference) #3384

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1267,11 +1267,14 @@ 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 (TypeBinding.equalsEquals(s.original(), t.original())) {
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));
}
if (TypeBinding.equalsEquals(s, t))
return result; // optimization #2: nothing interesting above equal types
TypeBinding tSuper = t.findSuperTypeOriginatingFrom(s);
if (tSuper != null) {
if (tSuper != null && s.isParameterizedType() && tSuper.isParameterizedType()) { // optimization #1 again
result.add(new Pair<>(s, tSuper));
}
result.addAll(allSuperPairsWithCommonGenericType(s.superclass(), t));
Expand Down
Loading