-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: reduce GC work during search #83077
Commits on Mar 13, 2021
-
Get rid of the garbage produced by getObjectFromId
There is no reason for this function to return an object, since it is always used for getting at the name anyhow. It's used in the inner loop for some popular functions, so we want to avoid allocating in it.
Configuration menu - View commit details
-
Copy full SHA for 5fe3b87 - Browse repository at this point
Copy the full SHA 5fe3b87View commit details -
In checkGenerics and checkType, don't use Array.prototype.splice so much
Every time splice() is called, another temporary object is created. This version, which uses plain objects as a sort of Hash Bag, should only produce one temporary object each time it's called.
Configuration menu - View commit details
-
Copy full SHA for d7971e5 - Browse repository at this point
Copy the full SHA d7971e5View commit details -
Eagerly generate the underscore-less name to search on
Basically, it doesn't make sense to generate those things every time you search. That generates a bunch of stuff for the GC to clean up, when, if the user wanted to do another search, it would just need to re-do it again.
Configuration menu - View commit details
-
Copy full SHA for 3f70bfa - Browse repository at this point
Copy the full SHA 3f70bfaView commit details -
Update src/librustdoc/html/static/main.js
Co-authored-by: Guillaume Gomez <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b76a3d3 - Browse repository at this point
Copy the full SHA b76a3d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca04ce3 - Browse repository at this point
Copy the full SHA ca04ce3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7d14b1 - Browse repository at this point
Copy the full SHA b7d14b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7834aeb - Browse repository at this point
Copy the full SHA 7834aebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 26f85cc - Browse repository at this point
Copy the full SHA 26f85ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for d92f840 - Browse repository at this point
Copy the full SHA d92f840View commit details
Commits on Mar 14, 2021
-
Avoid generating new strings for names that have no undescores
This should have negligible effect on time, but it cuts about 1MiB off of resident memory usage.
Configuration menu - View commit details
-
Copy full SHA for 0bfd142 - Browse repository at this point
Copy the full SHA 0bfd142View commit details -
Use a number for row.id, instead of a string
There's no reason for it to be a string, since it's only used for de-duplicating the results arrays anyhow.
Configuration menu - View commit details
-
Copy full SHA for f57d715 - Browse repository at this point
Copy the full SHA f57d715View commit details -
Make nameWithoutUndescores lowercased
This basically fixes a search bug introduced by earlier changes.
Configuration menu - View commit details
-
Copy full SHA for 8eba927 - Browse repository at this point
Copy the full SHA 8eba927View commit details
Commits on Mar 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for dcba95f - Browse repository at this point
Copy the full SHA dcba95fView commit details