New issue
Advanced search Search tips

Issue 825009 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Explore use ToolbarDataProvider.isDisplayingQueryTerms

Project Member Reported by thildebr@chromium.org, Mar 22 2018

Issue description

This check is done quite often and involves a call to the TemplateUrlService to extract search terms from the URL, so explore caching the value and observing changes to the SSL security state to update when necessary.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e1c4a571cc30435b7da908f3ed151e5f734406e8

commit e1c4a571cc30435b7da908f3ed151e5f734406e8
Author: Troy Hildebrandt <thildebr@chromium.org>
Date: Tue Mar 27 21:07:01 2018

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}
[modify] https://crrev.com/e1c4a571cc30435b7da908f3ed151e5f734406e8/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModelImpl.java

Status: Fixed (was: Assigned)

Sign in to add a comment