rustdoc-search: use tighter json for names and parents by notriddle · Pull Request #129426 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation12 Commits1 Checks6 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
File size
$ du -hs doc.old/search-index1.82.0.js doc/search-index1.82.0.js 3.2M doc.old/search-index1.82.0.js 2.8M doc/search-index1.82.0.js $ gzip doc/search-index1.82.0.js $ gzip doc.old/search-index1.82.0.js $ du -hs doc.old/search-index1.82.0.js.gz doc/search-index1.82.0.js.gz 464K doc.old/search-index1.82.0.js.gz 456K doc/search-index1.82.0.js.gz $ du -hs compiler-doc.old/search-index.js compiler-doc/search-index.js 8.5M compiler-doc.old/search-index.js 6.5M compiler-doc/search-index.js $ gzip compiler-doc/search-index1.82.0.js $ gzip compiler-doc.old/search-index1.82.0.js $ du -hs compiler-doc.old/search-index.js.gz compiler-doc/search-index.js.gz 1.4M compiler-doc.old/search-index.js.gz 1.4M compiler-doc/search-index.js.gz
Performance
Firefox profile: before, after
CLI profiler scripts comparison: https://notriddle.com/rustdoc-html-demo-9/smaller-index-2024-08-22/index.html
Benchmark | Before | After | % Diff |
---|---|---|---|
arti | 225692 KiB | 218744 KiB | 3% |
cortex-m | 58276 KiB | 57852 KiB | 0% |
sqlx | 123132 KiB | 125448 KiB | -2% |
stm32f4 | 556828 KiB | 548996 KiB | 1% |
ripgrep | 86964 KiB | 86180 KiB | 1% |
rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r?
to explicitly pick a reviewer
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Apart from the nit, looks good to me. Just a bit sad that we have yet again a perf (although very small) reduction in the JS.
Thanks! r=me once CI pass.
Apart from the nit, looks good to me. Just a bit sad that we have yet again a perf (although very small) reduction in the JS.
What do you mean? I'm seeing it inconsistent: sometimes slower and sometimes faster.
This comment has been minimized.
File size
$ du -hs doc.old/search-index1.82.0.js doc/search-index1.82.0.js
3.2M doc.old/search-index1.82.0.js
2.8M doc/search-index1.82.0.js
$ gzip doc/search-index1.82.0.js
$ gzip doc.old/search-index1.82.0.js
$ du -hs doc.old/search-index1.82.0.js.gz doc/search-index1.82.0.js.gz
464K doc.old/search-index1.82.0.js.gz
456K doc/search-index1.82.0.js.gz
$ du -hs compiler-doc.old/search-index.js compiler-doc/search-index.js
8.5M compiler-doc.old/search-index.js
6.5M compiler-doc/search-index.js
$ gzip compiler-doc/search-index1.82.0.js
$ gzip compiler-doc.old/search-index1.82.0.js
$ du -hs compiler-doc.old/search-index.js.gz compiler-doc/search-index.js.gz
1.4M compiler-doc.old/search-index.js.gz
1.4M compiler-doc/search-index.js.gz
I simply looked at the benchmark results you posted. It seems overall to tend to be a bit slower. But I'm not sure how reliable these results are. Maybe if there was an equivalent to instructions count, that'd be awesome, but I doubt JS allows to query this information...
I re-checked and you're right, nothing big enough to not be considered noise. Not sure why I was thinking overall it seemed to be slower, there is no consistency in this regard, sorry about that.
So like I said, r=me once CI pass and thanks for the size improvement!
📌 Commit 8151de2 has been approved by GuillaumeGomez
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
tgross35 added a commit to tgross35/rust that referenced this pull request
bors added a commit to rust-lang-ci/rust that referenced this pull request
Rollup of 7 pull requests
Successful merges:
- rust-lang#128192 (rustc_target: Add various aarch64 features)
- rust-lang#128507 (Migrate
libtest-thread-limit
run-make
test to rmake) - rust-lang#129190 (Add f16 and f128 to tests/ui/consts/const-float-bits-conv.rs)
- rust-lang#129276 (Stabilize feature
char_indices_offset
) - rust-lang#129350 (adapt integer comparison tests for LLVM 20 IR changes)
- rust-lang#129414 (Fix extern crates not being hidden with
doc(hidden)
) - rust-lang#129426 (rustdoc-search: use tighter json for names and parents)
r? @ghost
@rustbot
modify labels: rollup
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request
This was referenced
Aug 23, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request
…llaumeGomez
Rollup of 9 pull requests
Successful merges:
- rust-lang#128511 (Document WebAssembly target feature expectations)
- rust-lang#129243 (do not build
cargo-miri
by default on stable channel) - rust-lang#129263 (Add a missing compatibility note in the 1.80.0 release notes)
- rust-lang#129276 (Stabilize feature
char_indices_offset
) - rust-lang#129350 (adapt integer comparison tests for LLVM 20 IR changes)
- rust-lang#129408 (Fix handling of macro arguments within the
dropping_copy_types
lint) - rust-lang#129426 (rustdoc-search: use tighter json for names and parents)
- rust-lang#129437 (Fix typo in a help diagnostic)
- rust-lang#129457 (kobzol vacation)
r? @ghost
@rustbot
modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the rustdoc team, which will review and decide on the PR/issue.