NTP: Avoid expensive decoding of theme background image |
|||||||
Issue descriptionInstantService::BuildThemeInfo accesses the theme background image (IDR_THEME_NTP_BACKGROUND) only to get the image height. This causes the image to get decoded, which is fairly expensive, so the whole thing seems quite wasteful. The image height is passed to the NTP (the actual JavaScript) through the embeddedSearch API as embeddedSearch.newTabPage.themeBackgroundInfo.imageHeight, which seems to be completely unused, and it's also not documented at https://www.chromium.org/embeddedsearch. So maybe the imageHeight field can just be removed, making the whole image access unnecessary. See also internal bug b/70795531.
,
Jan 26 2018
,
Jan 30 2018
,
Feb 1 2018
,
Feb 1 2018
,
Feb 5 2018
,
Feb 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ee5a883e7a082e1456108378340c8013b330588d commit ee5a883e7a082e1456108378340c8013b330588d Author: Ramya Nagarajan <ramyan@chromium.org> Date: Mon Feb 05 22:23:44 2018 Removed ThemeBackgroundInfo.image_height. The theme background image is accessed (and decoded) by InstantService::BuildThemeInfo only to get the image height. It is then passed to the NTP via the embeddedSearch API, where it is unused. Removing this unnecessary access should improve NTP load time in some instances. Bug: 806251 Change-Id: I8f15c51e4b2ac9b9cbd880ac7586c7c92b4e0416 Reviewed-on: https://chromium-review.googlesource.com/902184 Reviewed-by: Marc Treib <treib@chromium.org> Reviewed-by: Emily Stark <estark@chromium.org> Reviewed-by: Mathieu Perreault <mathp@chromium.org> Commit-Queue: Ramya Nagarajan <ramyan@chromium.org> Cr-Commit-Position: refs/heads/master@{#534506} [modify] https://crrev.com/ee5a883e7a082e1456108378340c8013b330588d/chrome/browser/search/instant_service.cc [modify] https://crrev.com/ee5a883e7a082e1456108378340c8013b330588d/chrome/common/instant_struct_traits.h [modify] https://crrev.com/ee5a883e7a082e1456108378340c8013b330588d/chrome/common/search/instant_types.cc [modify] https://crrev.com/ee5a883e7a082e1456108378340c8013b330588d/chrome/common/search/instant_types.h [modify] https://crrev.com/ee5a883e7a082e1456108378340c8013b330588d/chrome/renderer/searchbox/searchbox_extension.cc
,
Feb 5 2018
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by treib@chromium.org
, Jan 26 2018