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

AbstractTreeViewer do not auto-expand same nodes multiple times #2684

Closed
wants to merge 1 commit into from

Conversation

jukzi
Copy link
Contributor

@jukzi jukzi commented Jan 10, 2025

fixes slow (Quick-)Type hierarchy for redundant superinterfaces

eclipse-jdt/eclipse.jdt.ui#1830

fixes slow (Quick-)Type hierarchy for redundant superinterfaces

eclipse-jdt/eclipse.jdt.ui#1830
@jukzi
Copy link
Contributor Author

jukzi commented Jan 10, 2025

@fedejeanne for the example from eclipse-jdt/eclipse.jdt.ui#1922
image

Copy link
Contributor

Test Results

 1 518 files   -   300   1 518 suites   - 300   1h 4m 11s ⏱️ - 31m 53s
 7 732 tests ±    0   7 503 ✅  -     1  228 💤 ±  0  1 ❌ +1 
22 703 runs   - 1 654  22 150 ✅  - 1 458  552 💤  - 197  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 8560cca. ± Comparison against base commit f878f80.

@fedejeanne
Copy link
Contributor

I tested this in our big WS and it works like a charm: both the Type Hierarchy and the Quick Type Hierarchy of the problematic class (the "original Broke1") open in under 8s! 🚀 👏

@fedejeanne
Copy link
Contributor

It just occurred to me: how does this PR affect other use cases where the user wants to expand the tree completely e.g. when he/she presses the button "Expand All"?
I'm away from the computer until Monday but I'd like to test this PR for more use cases before it gets merged. Can you please hold it, @jukzi ?

@jukzi
Copy link
Contributor Author

jukzi commented Jan 13, 2025

While i guess, all our views would benefit of it there may be views downstream that may be confused. While it does not make sense to have such "loops" in a tree, there may be for example both a quicklink (favorite) and the subtree itself in a view (like in windows file explorer). I think it doesn't make sense to expand both but still adopters may not expect it. So i suggest you take this PR as a proof of concept, enhance it to offer the behavior as API and let usages like jdt opt-in. Could you please provide such PRs?

@jukzi
Copy link
Contributor Author

jukzi commented Jan 15, 2025

to be replaced by #2692

@jukzi jukzi closed this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants