You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for example
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces() recursively calls ReferenceBinding.superInterfaces() (without even using the returned type (// make super-type resolving recursive for propagating typeBits downwards) and does not protect against redundant super interfaces
sampling data from #3387 (comment): @fedejeanne you may want to protect this against already visited types too.
The text was updated successfully, but these errors were encountered:
…t#3601
- Make the method final
- Add new recursive method ReferenceBinding.superInterfacesRecursive
that takes an IndentityHashMap to keep the visited types
Fixeseclipse-jdt#3601
I've been looking at it and trying different approaches but I can't get any perceivable improvement in the compilation time. The problem is that the recursive call of org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces () only constitutes a small portion of the overall calls. A big chunk of the calls come from other methods and these are the ones which should remember which types have already been visited.
Here's an example: org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.getExactMethod () (overloaded method)
If one would start remembering the visited types when starting that chain of calls, one could possibly spare some calls. But that would mean passing lots of Sets around and would taint the code a lot.
for example

org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces() recursively calls ReferenceBinding.superInterfaces() (without even using the returned type (
// make super-type resolving recursive for propagating typeBits downwards
) and does not protect against redundant super interfacessampling data from #3387 (comment):
@fedejeanne you may want to protect this against already visited types too.
The text was updated successfully, but these errors were encountered: