Resize timing check can start measuring before the hardware charts finish their first animation
Maintainer thường phản hồi trong vòng 6 ngà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
- 49/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- testing
Hướng nghiên cứu
Start with tests/playwright/specs/fixtures/resize.spec.js and src/components/views/MetricsGraphics.jsx; check whether each hardware chart receives more than one MG.data_graphic call before resizing, as the issue suggests. Then inspect how the spec starts its PerformanceObserver and how chart transitions run during page load. Done means confirming or ruling out the timing explanation and finding a way to keep the 1000 ms budget from counting chart loading work.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
tests/playwright/specs/fixtures/resize.spec.js (added in #409) failed all three attempts in CI on #493: https://github.com/mozilla/ensemble/actions/runs/42708249217/job/129470673505. It measured 1095, 6946 and 1023 ms of long tasks against a 1000 ms budget. #493 does not change anything this test exercises: the same commits passed CI on another branch a few minutes later, main passes, and the spec passes 8 out of 8 runs locally.
The test starts its PerformanceObserver once the last chart's <svg> is visible. That may be too early. In src/components/views/MetricsGraphics.jsx, the first draw in componentDidMount is not animated (metrics-graphics defaults to animate_on_load: false), but any later update with different data is: transition_on_update defaults to true, which means a 1000 ms line transition. If a chart is drawn and then redrawn with new data while the page loads, that transition can still be running when measuring starts, and its cost gets counted against the resize. 6946 ms is close to the roughly 6 s the spec's comment gives for animating lines on resize, which fits this explanation. It hasn't been confirmed.
Two possible fixes, keeping the 1000 ms budget:
- Before starting the observer, wait until no chart transition is still running, for example by waiting until the line paths stop changing or by checking for active d3 transitions.
- Or wait for the main thread to go quiet first: start a long-task observer and only begin the resize sequence once no long task has been reported for some interval.
Checking first whether the hardware charts really do get an animated update during load (more than one MG.data_graphic call per chart before the resize starts) would confirm or rule out this explanation.
- Ngôn ngữ chính
- JavaScript
- Star
- 21
- Fork
- 7
- Merge trung bình
- 6 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 8
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
-
Fira Sans is still usedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 6 ngày
-
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 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 6 ngày
-
Links missing hover effectsĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 6 ngày
-
Post-deploy housekeeping: build script order, source maps, ogimage.xcf, old static/ treeCó thể đã có người làm @stephaniehobson đã nhận 1 ngày trước. Đang mở
mozilla/ensemble#488 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 6 ngày
Tất cả issue của mozilla/ensemble
Issue tương tự
-
Add: Film Mania PLĐang mởcheck:passed feeds:add
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add resource: BlockVectraĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
SACGF/variantgrid#2791 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
hiero-ledger/hiero-sdk-js#4761 ·
Maintainer thường phản hồi trong vòng 1 ngày