-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[mdbook] Disable the Search Index #2469
Conversation
r? @rust-lang/docs |
Hm, I'm not sure how I feel about this. Disabling it for everyone because of one platform is not ideal. |
While I originally noticed this due to the crashing in iOS, I believe that 38MB is unreasonably large for any browser / device. For example, on Desktop Chrome, it takes about ~2 seconds before scrolling works after the initial content is displayed. Also, from Chrome's Performance audit, it spent ~2s to parse and compile the script plus an additional 6.5s(!!) to execute it. |
Yeah I mean, I certainly don’t think that it’s a great state of affairs. I wonder why it’s so much larger than say, the book, when I feel like it has significantly less content.
… On Jun 11, 2018, at 7:20 AM, Tim Neumann ***@***.***> wrote:
While I originally noticed this due to the crashing in iOS, I believe that 38MB is unreasonably large for any browser / device. For example, on Desktop Chrome, it takes about ~2 seconds before scrolling works after the initial content is displayed. Also, from Chrome's Performance audit, it spent ~2s to parse and compile the script plus an additional 6.5s(!!) to execute it.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I just came searching for any clue on the search functionality on https://rust-lang.github.io/rfcs. I know this issue is about removing that search functionality, but in the interest of keeping the non-RFC issues to a minimum in this repo, I'll just report this here (given that at least @steveklabnik will get a ping). I just proposed a new "bang" query to DuckDuckGo, However, it seems that searching for an RFC ID (so a GH issue number) does not work in the book (f.e. https://rust-lang.github.io/rfcs/?search=2497 returns "no results"). It's not that big of a deal (cmd+F still works, since the issue number is part of the index on the left), but I figured I'd report this here, in case we want to make that work as well. |
A first A few others will follow. :) |
@GuillaumeGomez: I don't think https://rust-lang.github.io/rfcs uses rustdoc to render itself, but rather mdbook (which I don't think was affected by your changes). However there was rust-lang/mdBook#707, which should have reduced the size of the search index at least somewhat. |
This PR prevents
mdbook
from generatingsearchindex.js
and related files. This means that searching the content at http://rust-lang.github.io/rfcs/ will no longer work.searchindex.js
currently contains 38MB(!!) of JavaScript. Even when compressed, that's still around 6MB. Aside from being unreasonably large, this also causes Mobile Safari to crash the tab.Search functionality is still available on the GitHub repo, so I suggest disabling the search index until its size can somehow be reduced.