-
Committer:
Thomas Wolf
-
Date:
2020-05-15 09:03:43 UTC
-
Revision ID:
git-v1:24a28bdaa03e9bb28cb3663e17241c50c4abe1e0
StagingView: speed up updating staged/unstaged viewers
Updating the selection used contains() on the values of a map. That
may be inefficient if many elements are removed. The values are either
StagingEntry or StagingFolderEntry objects, and we know that no two
of them can compare equal(), so use a LinkedHashSet instead.
Moreover, if all paths were removed, avoid any viewer state restoration
at all.
Bug: 563167
Change-Id: I5c07481972625f625dd4ae34ee85330e0118648e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>