• Joe DeBlasio's avatar
    [Lookalikes] Avoid unnecessary call into SiteEngagementService. · c0724101
    Joe DeBlasio authored
    This CL removes an unnecessary call to IsEngagementAtLeast() in
    OnFetchEngagedSites(). This call unnecessarily recomputed the score
    for many URLs, even of which required acquiring a lock. This was
    causing jank, as many threads could call OnFetchEngagedSites() at
    once.
    
    This fix is a bandaid to reduce jank quickly. A follow-up CL will
    hopefully refactor LookalikeUrlService a bit to ensure that only
    one call to GetAllDetailsInBackground (which calls
    OnFetchEngagedSites) is outstanding at a time.
    
    Bug: 1157596
    Change-Id: I66a4946b3cf8b1b1800f019a35f56ea9f55b6d92
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617874
    Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
    Reviewed-by: default avatarMustafa Emre Acer <meacer@chromium.org>
    Auto-Submit: Joe DeBlasio <jdeblasio@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#841761}
    c0724101
lookalike_url_service.cc 5 KB