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

rustdoc-search: stop constructing pointless arrays in decode #127379

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

notriddle
Copy link
Contributor

I'm not sure why I ever thought that would be okay. This is clearly hot code, and should avoid Array.prototype.map when it's not needed. In any case, it shows up in the profiler.

rustdoc-js-profiler:
https://notriddle.com/rustdoc-html-demo-11/decode-opt-1/index.html

Firefox profiler:
Before
After

I'm not sure why I ever thought that would be okay. This is
clearly hot code, and should avoid Array.prototype.map when
it's not needed. In any case, it shows up in the profiler.

rustdoc-js-profiler:
https://notriddle.com/rustdoc-html-demo-11/decode-opt-1/index.html

Firefox profiler:
[Before](https://share.firefox.dev/3RRH2fR)
[After](https://share.firefox.dev/3Wblcq8)
@notriddle notriddle added A-rustdoc-search Area: Rustdoc's search feature A-rustdoc-js Area: Rustdoc's front-end T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jul 5, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 5, 2024

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 5, 2024
@GuillaumeGomez
Copy link
Member

Funnily enough, the results often show that nightly was faster. However, the diff is so small that I think it's irrelevant. Very good idea in any case, thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 6, 2024

📌 Commit fbb6300 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors 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 Jul 6, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 6, 2024
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#127275 (offset_from, offset: clearly separate safety requirements the user needs to prove from corollaries that automatically follow)
 - rust-lang#127379 (rustdoc-search: stop constructing pointless arrays in decode)
 - rust-lang#127391 (Use verbose suggestion for `ptr::null_mut()`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0405652 into rust-lang:master Jul 6, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 6, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 6, 2024
Rollup merge of rust-lang#127379 - notriddle:notriddle/decode, r=GuillaumeGomez

rustdoc-search: stop constructing pointless arrays in decode

I'm not sure why I ever thought that would be okay. This is clearly hot code, and should avoid Array.prototype.map when it's not needed. In any case, it shows up in the profiler.

rustdoc-js-profiler:
https://notriddle.com/rustdoc-html-demo-11/decode-opt-1/index.html

Firefox profiler:
[Before](https://share.firefox.dev/3RRH2fR)
[After](https://share.firefox.dev/3Wblcq8)
@notriddle notriddle deleted the notriddle/decode branch July 6, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-js Area: Rustdoc's front-end A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants