Optimize removing all user bookmarks
While removing all user bookmarks the call site of UrlIndex::Remove is collecting all |removed_urls|. Each next call already contained all previously deleted urls. These |removed_urls| were used to check if there are other bookmarks with the same URL. This led to quadratic number of iterations over |removed_urls| as each next call iterated over all previously deleted URLs. This CL slightly changes behaviour of UrlIndex::Remove. It doesn't read |removed_urls| anymore, hence it's safe to pass non-empty value. Bug: 1096984 Change-Id: I4a9aadefe94e6becdc7c6c08ccc7b8d7b98f27f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362966Reviewed-by:Scott Violet <sky@chromium.org> Commit-Queue: Rushan Suleymanov <rushans@google.com> Cr-Commit-Position: refs/heads/master@{#800271}
Showing
Please register or sign in to comment