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

Reduce freeze times on updating search results on resource changes #2288

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

iloveeclipse
Copy link
Member

If the search view shows ~100000 matches, deleting resources that are shown in the search view freezes Eclipse for many minutes. With this change the freeze is only about 30 seconds.

See #2279

To test, perform steps from #2279 and after search results view shows matches, delete generated files in Package Explorer.

@iloveeclipse
Copy link
Member Author

@raghucssit : I had not enough time to play with this patch today, but it seemed to work (on top of your #2280).

Could you please double check that that works as expected?

Copy link
Contributor

github-actions bot commented Sep 17, 2024

Test Results

  605 files  +  605    605 suites  +605   40m 31s ⏱️ + 40m 31s
7 699 tests +7 699  7 421 ✅ +7 421  278 💤 +278  0 ❌ ±0 
8 086 runs  +8 086  7 806 ✅ +7 806  280 💤 +280  0 ❌ ±0 

Results for commit 89ac102. ± Comparison against base commit 5af8f51.

♻️ This comment has been updated with latest results.

* @since 3.17
*/
public boolean hasMatches() {
for (Entry<Object, Set<Match>> entry : fElementsToMatches.entrySet()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when only values are needed better iterate over Map.values()

@raghucssit
Copy link
Contributor

@iloveeclipse I tested this PR. Changes LGTM.
I tried with different viewer limits like 5k, 10k, 20k, 50k, etc. Default limit is 1k.
With default limit there was a noticeable lag while clearing all matches. Now it works like magic. Very very fast.
Upto 20k viewer limit it clears the matches in no time.(Regular users may not go beyond this)
I did not observe any problem.

If the search view shows ~100000 matches, deleting resources that are
shown in the search view freezes Eclipse for many minutes. With this
change the freeze is only about 30 seconds.

See eclipse-platform#2279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants