Commit 0405652
authored
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)1 file changed
+7
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3293 | 3293 | | |
3294 | 3294 | | |
3295 | 3295 | | |
3296 | | - | |
3297 | 3296 | | |
3298 | 3297 | | |
3299 | | - | |
| 3298 | + | |
3300 | 3299 | | |
3301 | 3300 | | |
3302 | 3301 | | |
| |||
3305 | 3304 | | |
3306 | 3305 | | |
3307 | 3306 | | |
3308 | | - | |
3309 | 3307 | | |
3310 | 3308 | | |
3311 | | - | |
| 3309 | + | |
3312 | 3310 | | |
3313 | 3311 | | |
3314 | 3312 | | |
3315 | | - | |
| 3313 | + | |
3316 | 3314 | | |
3317 | 3315 | | |
3318 | 3316 | | |
| |||
3325 | 3323 | | |
3326 | 3324 | | |
3327 | 3325 | | |
3328 | | - | |
3329 | 3326 | | |
3330 | | - | |
| 3327 | + | |
3331 | 3328 | | |
3332 | | - | |
| 3329 | + | |
3333 | 3330 | | |
3334 | 3331 | | |
3335 | 3332 | | |
3336 | | - | |
| 3333 | + | |
3337 | 3334 | | |
3338 | 3335 | | |
3339 | 3336 | | |
| |||
3472 | 3469 | | |
3473 | 3470 | | |
3474 | 3471 | | |
3475 | | - | |
3476 | 3472 | | |
3477 | 3473 | | |
3478 | 3474 | | |
| |||
3639 | 3635 | | |
3640 | 3636 | | |
3641 | 3637 | | |
3642 | | - | |
| 3638 | + | |
3643 | 3639 | | |
3644 | 3640 | | |
3645 | 3641 | | |
| |||
0 commit comments