Serve compressed JavaScript and CSS from data.firefox.com
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, google-cloud, javascript
- Lĩnh vực
- devops, performance
Hướng nghiên cứu
Read .github/workflows/deploy.yml and docs/architecture/deploy.md to understand the upload and CDN path. First check the proposed gcloud storage cp option and validate a stage deployment with the provided curl -sI command. Done means text assets return content-encoding: gzip and the site still loads in Firefox, Chrome, and Safari, with CDN behavior and deep links checked.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Production serves JavaScript and CSS uncompressed. Every assets/ response from data.firefox.com comes back with no content-encoding, even though the browser offered gzip, br and zstd:
| File | On the wire today | Gzipped (vite preview) |
|---|---|---|
index-*.js |
214 KB | 71 KB |
DashboardContainer-*.js |
179 KB | 68 KB |
ChartContainer-*.js |
268 KB | 90 KB |
On a slow 4G connection, the main script alone takes 1.76 s to download in production, against 0.97 s from a local gzipped build. Every step of a first visit waits on downloads like this one. This is the largest single cost found while measuring #516, and it lives in the deploy, not the app.
The transposer's JSON under datasets/ is uncompressed too.
Proposed fix
In .github/workflows/deploy.yml, upload text assets gzip-encoded:
gcloud storage cp --gzip-local-extensions=js,css,svg,html,json ...
This stores each object gzip-compressed, with Content-Encoding: gzip. Cloud Storage decompresses on the fly for the rare client that doesn't accept gzip.
To check
- After a deploy to stage, check that
curl -sI -H 'Accept-Encoding: gzip' <stage>/assets/index-*.jsshowscontent-encoding: gzip, and that the site still loads in Firefox, Chrome and Safari. - Check that the CDN in front of the bucket (
FORCE_CACHE_ALL, seedocs/architecture/deploy.md) passes the encoding through and still serves deep links. - Ask the CDN/bucket owners in Data Engineering whether Cloud CDN's dynamic compression (brotli) can be turned on. That would also cover the transposer's JSON without any change to how it uploads.
- Separately, the CDN rewrites
cache-controltopublic,max-age=0on content-hashed assets, so they're revalidated on every visit. That's worth raising in the same conversation.
Found while measuring #516.
- Ngôn ngữ chính
- JavaScript
- Star
- 21
- Fork
- 7
- Merge trung bình
- 3 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 23
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mozilla/ensemble
-
Do not show all data by defaultĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Explore ways to improve first-load performanceCó thể đã có người làm @stephaniehobson đã nhận 4 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
mozilla/ensemble#516 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
mozilla/ensemble#496 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Post-deploy housekeeping: build script order, source maps, ogimage.xcf, old static/ treeCó thể đã có người làm @stephaniehobson đã nhận 14 ngày trước. Đang mở
mozilla/ensemble#488 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của mozilla/ensemble
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Inter-Actief/amelink#140 ·
-
area:tooling priority:p3 scope:infrastructure size:s status:ready type:chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
pre-existing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày