New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 872568 link

Starred by 1 user

Issue metadata

Status: Available
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature



Sign in to add a comment

IDR_SECURITY_INTERSTITIAL_HTML should be stored compreesed (90kb)

Project Member Reported by agrieve@chromium.org, Aug 9

Issue description

IDR_SECURITY_INTERSTITIAL_HTML is the 2nd largest pak entry at 117kb.
If compressed, it would be:
brotli: 38kb
gzip: 42kb

IDR_SECURITY_INTERSTITIAL_QUIET_HTML should also be compressed.
https://cs.chromium.org/chromium/src/components/resources/security_interstitials_resources.grdp


From supersize:
3)      30375 (43.3%) P@0x42b3     25191 (size=50383) components/security_interstitials/content/security_interstitial_page.cc
             ../../components/resources/security_interstitials_resources.grdp: IDR_SECURITY_INTERSTITIAL_HTML (num_aliases=2)
4)      55567 (79.2%) P@0x42b3     25191 (size=50383) components/security_interstitials/core/safe_browsing_loud_error_ui.cc
             ../../components/resources/security_interstitials_resources.grdp: IDR_SECURITY_INTERSTITIAL_HTML (num_aliases=2)
5)      62123 (88.6%) P@0x42b4     6556 (size=13113) chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.cc
             ../../components/resources/security_interstitials_resources.grdp: IDR_SECURITY_INTERSTITIAL_QUIET_HTML (num_aliases=2)
6)      68680 (97.9%) P@0x42b4     6556 (size=13113) components/security_interstitials/core/safe_browsing_quiet_error_ui.cc
             ../../components/resources/security_interstitials_resources.grdp: IDR_SECURITY_INTERSTITIAL_QUIET_HTML (num_aliases=2)
 
What's the best method to use the gzipped resources as HTML templates? Is there an example you could point me to?

We currently use GetRawDataResource, I presume we would need to unzip the file first.

 std::string html =
      ui::ResourceBundle::GetSharedInstance()
          .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_QUIET_HTML)
          .as_string();
I think all existing compressed passes use webui to do the decompression. Not clear to me if this would be able to take advantage of that:
https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc?rcl=455eacbb9908bc2b7a260dacceef0b584244378b&l=62

One other spot is about:credits, which compresses with brotli instead. It uncompresses explicitly.
https://cs.chromium.org/chromium/src/components/about_ui/credit_utils.cc?rcl=78fe025a82e693c8e4b53ca887c503d5804f5faa&l=26
Cc: nparker@chromium.org
Adding nparker@ lead on safe browsing for advice. Is this something, someone on your team with spare cycled could look at?



Cc: -f...@chromium.org felt@google.com
Labels: -Type-Bug Type-Feature
Owner: carlosil@chromium.org
Seems like a reasonable idea.

-> carlosil, owner of things-related-to-interstitial-pages

Cc: -felt@google.com f...@chromium.org

Comment 6 by agrieve@chromium.org, Yesterday (42 hours ago)

Labels: binary_size_team_q1_2019

Sign in to add a comment