-
Jered Gray authored
Previously, the HintCache's initialization, which involved adding all hints contained within a hint vector to the cache, was being handled on the UI thread. This initialization could take a significant amount of time and triggered the creation of a jank startup performance bug. The logic has been modified so that the HintCache is no longer initialized on the UI thread. It is instead initialized within its constructor during PreviewsHints::CreateFromHintsComponent() on a background thread. This is accomplished via a HintCache::Data object. Once the hints are fully added to Data, it is moved into the HintCache's constructor. The HintCache is immutable after construction. Not only does this remove all of the costly UI thread processing, but it also eliminates the expensive intermediate hint vector. Bug: 910251 Change-Id: I04a28248ad1ce790f999da06f48e3c5aabfcb812 Reviewed-on: https://chromium-review.googlesource.com/c/1356226 Commit-Queue: Jered Gray <jegray@chromium.org> Reviewed-by:
Doug Arnett <dougarnett@chromium.org> Reviewed-by:
Tarun Bansal <tbansal@chromium.org> Cr-Commit-Position: refs/heads/master@{#613196}
35dcd9d1