Community
Participate
Working Groups
Build I20021204 There are significant performance problems with the "Remove All Matches" action in the search results view when using a large workspace, or when there are many search results. First, this action executes without a busy cursor and thus can lock the UI without any painting for several minutes. I profiled this action, expecting that most of the time was taken by the core removal operation. In fact, most of the time is taken by the search results view update code. The entry point is SearchManger#handleSearchMarkersChanged. This code iterates over the markers one at a time, does a linear search for the marker in the results data structures, and then does a removal with linear cost if the marker is found. It then removes the single entry (one at a time) from the table viewer. This could be significantly improved in the common case where the user has selected to "remove all matches". Interestingly, there is a method SearchManager#handleRemoveAll which does this in an optimal fashion, but it never seems to be called.
Needs investigation. NOTE: Regarding busy cursor: there's a PR which hasn't been fixed for a while: Bug 5544: [Viewers] Sometimes no busy cursor for action started from context menu
Search is marker driven. Even if the resource delta only contains remove marker deltas then the SearchManager is not sure whether all markers got deleted. However I can improve the performance by letting the SearchManager remove all results and the action triggers that removeAll.