google / google/perfetto

perfetto.dev serves all assets uncompressed

Open
#6,739 1 comment 0 reactions 0 assignees View on GitHub
fixit
Dominant language
C++
Stars
6.5k
Forks
868
Avg merge
2d 1h
Merged PRs (30d)
218

Description

The App Engine proxy copies the stored object's `content_encoding` onto every response. Since `download_as_bytes()` always returns decompressed bytes, this stamps a bogus `Content-Encoding` (either `gzip` or the literal `None`), which makes the App Engine frontend skip its own gzip.

Result: HTML, JS, CSS, and the search index all ship uncompressed (~2.5-3x larger than they should be).

For the docs search we worked around this in https://github.com/google/perfetto/pull/6702 by shipping the index pre-gzipped and decompressing it in the browser. That workaround should be removed once the proxy is fixed.

Better fix: align the docs-site serving with how the UI server already handles compression.

Contributor guide

Open the contributing guide

Research direction

Inspect the App Engine proxy and compare its response compression handling with the UI server. Review PR 6702 to identify the pre-gzipped search-index workaround. Done means HTML, JavaScript, CSS, and search-index assets are served compressed without bogus Content-Encoding headers, allowing that workaround to be removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, google-cloud, html, javascript
Domain
documentation, infrastructure, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.