Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache result of ToolbarModelImpl#extractSearchTermsFromUrl.
The call to #extractSearchTermsFromUrl is quite expensive and can happen for the same URL needlessly and endlessly right now. It's called 3 times for every omnibox focus, and 3 times for every unfocus for instance. Since the URL we're checking is often the same as previously, we cache the last URL and security level we saw when performing this call, and only perform the work if they differ, caching the values for use next time. This means that in most cases we only need to perform the work one time for every URL we navigate to. Bug: 825009 Change-Id: Ie28ef271afaf4813baf50c2f1e84d86e752565bc Reviewed-on: https://chromium-review.googlesource.com/980740 Commit-Queue: Troy Hildebrandt <thildebr@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Cr-Commit-Position: refs/heads/master@{#546258}
- Loading branch information