-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Hi,
There is a performance problem in the Search View when search term is used which occcurs several million times in the workspace
The search gets slower and freezes the UI.
Additionally when the user selects an IFile/IConntainer and removes its matches, the Search View deletes them one by one. This leads to significant performance degradation. The root cause is that matches are removed individually instead of being removed in a single operation from the underlying map.
Additionally, there is an issue related to the configured result limit. When a limit is set, the Search View only shows a subset of the matches. If the user selects an IFile and removes its matches, only the visible matches are deleted, while the hidden ones (filtered out by the limit) remain. However, the expected behavior is that all matches belonging to the selected file or resource should be removed.
The reproduction scenario for the problems described above:
- Create or import a project with many files that contain a very common search term (resulting in several thousand matches, 25.000 should be enough).
- Start a File Search for that term.
- Enable the result limit in the filter options (e.g., 1,000 matches), reducing the number of visible results.
- In the Search View, select an IFile or IResource containing many matches.
- Trigger Remove Selected Matches.
Behavior:
Removal is slow due to match‑by‑match deletion.
Only visible matches are removed; hidden ones remain in the model.
Expectation:
Removal should be done fast.
All matches for the selected file/resource are removed, regardless of the visible limit.
I would like to propose a fix that addresses these problems.
Best regards
Mehmet Karaman