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

Searching the windows crate uses massive amounts of CPU and memory #136990

Closed
abgros opened this issue Feb 13, 2025 · 2 comments
Closed

Searching the windows crate uses massive amounts of CPU and memory #136990

abgros opened this issue Feb 13, 2025 · 2 comments
Labels
C-bug Category: This is a bug.

Comments

@abgros
Copy link

abgros commented Feb 13, 2025

Microsoft's Windows crate has its documentation generated with rustdoc which can be found at https://microsoft.github.io/windows-docs-rs/doc/windows/.

Trying to use the search bar on this documentation causes the browser to hang, due to the site trying to load a 28 MB JSON file (the problematic code is at https://microsoft.github.io/windows-docs-rs/doc/search-index.js). On my laptop this causes the fans to spin up like jet engines, followed by (about half the time) the tab crashing with an out of memory error.

Instead of a massive JSON file, I would recommend instead using the IndexedDB API, which also has the benefit of not needing to be reloaded every time the user visits the site.

@abgros abgros added the C-bug Category: This is a bug. label Feb 13, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 13, 2025
@cyrgani
Copy link
Contributor

cyrgani commented Feb 13, 2025

This seems to be the same as #131156.

@workingjubilee
Copy link
Member

I think the comment is useful so I have folded it into the other issue.

@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants