Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization of HTML generated by cargo timings #13299

Open
mox692 opened this issue Jan 15, 2024 · 1 comment
Open

Optimization of HTML generated by cargo timings #13299

mox692 opened this issue Jan 15, 2024 · 1 comment
Labels
A-timings Area: timings C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Performance Gotta go fast! S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@mox692
Copy link

mox692 commented Jan 15, 2024

Problem

Sometimes I use cargo timings in my projects, and find that the HTML generated by them often slows down the browser (chrome in my case).
I have also measured the cargo timings in the cargo project for reproduce, and it seems to be taking longer to work as well. (As shown in the attached image, it took about 5s to become operational.)
I guess that the browser is slowing down because the JS that is drawing the canvas is occupying the CPU.

There might be room for optimization of the generated JS.

screenshot

cargo-timing.html.zip

Proposed Solution

No response

Notes

  • cargo 1.75.0 (1d8b05c 2023-11-20)
  • Host: x86_64-apple-darwin
  • Chrome Version 120.0.6099.216 (Official Build) (x86_64)

I didn't try this in Firefox because of #8850 .

@mox692 mox692 added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Jan 15, 2024
@epage epage added A-timings Area: timings Performance Gotta go fast! labels Jan 15, 2024
@weihanglo weihanglo added S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. and removed S-triage Status: This issue is waiting on initial triage. labels Feb 29, 2024
@weihanglo
Copy link
Member

Some related exploration about improving the timing HTML people might be interested in: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/New.20visualizations.20for.20cargo-timing.2Ehtml. Feel free to experiment on modernizing the HTML/JS/CSS part of it.

@weihanglo weihanglo added S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. and removed S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. labels Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-timings Area: timings C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Performance Gotta go fast! S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

3 participants