-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Problem
When I open an HTML file with timings, it always chooses "Scale: 20". Depending on the project, the graph is always too wide or too narrow with this default setting. I always manually adjust the scale to fit the screen, and that's very annoying.
Here's how wide it is for my proprietary project (note the horizontal scrollbar at the bottom, the graph is 2x wider than the window):
And here's how narrow it is for SeaORM:
The graph width seems roughly proportional to the total compile time? (134 vs 14 seconds)
It's unclear what unit "Scale" is supposed to be.
Steps
git clone --single-branch --depth=1 https://github.com/SeaQL/sea-orm.git
cd sea-orm/
cargo +nightly build --timings
firefox target/cargo-timings/cargo-timing.html
Possible Solution(s)
Automatically choose the "Scale" setting that makes the graph fit the screen. At least, there should be a button that jumps to the optimal scale.
The proprietary graph with manually adjusted Scale (note the whitespace on the right. The horizontal scrollbar at the bottom is gone):
SeaORM graph with manually adjusted Scale:
I can't even manually adjust SeaORM graph to screen width, because of the max scale limit. But that's a separate issue and there could be legitimate reasons. I'd be OK if it at least auto-expanded to this max allowed scale.
Notes
I use Firefox 136.0 on Linux. I've also checked Chromium 137.0.7151.103, the same thing happens.
Could be somehow related: #8850
Version
cargo 1.89.0-nightly (fc1518ef0 2025-06-06)
release: 1.89.0-nightly
commit-hash: fc1518ef02b77327d70d4026b95ea719dd9b8c51
commit-date: 2025-06-06
host: x86_64-unknown-linux-gnu
libgit2: 1.9.0 (sys:0.20.2 vendored)
libcurl: 8.12.1-DEV (sys:0.4.80+curl-8.12.1 vendored ssl:OpenSSL/3.5.0)
ssl: OpenSSL 3.5.0 8 Apr 2025
os: Ubuntu 25.4.0 (plucky) [64-bit]