# Installing docs is slow on Windows

**URL:** <https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917>\
**Category:** tools and infrastructure\
**Created:** [November 28, 2018, 11:51am UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917 "2018-11-28T11:51:24Z")\
**Posts on this page:** 19\
**Page:** 2

<div class="post-metadata">

**Author:** ![DanielKeep](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/danielkeep/32/1332_2.png) [@DanielKeep](https://internals.rust-lang.org/u/DanielKeep)\
**Post date:** [November 29, 2018, 12:58pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/21 "2018-11-29T12:58:13Z")

</div>

> [@kornel](#):
>
> invisible to user

As someone using spinning rust, having a background process hammering the disk is _absolutely_ visible to the user. I'd be angry at an installer doing that in the background where I can't stop it, without any indication as to how long it'll be before I can use the disk again.

---

<div class="post-metadata">

**Author:** ![Uther](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/uther/32/6225_2.png) [@Uther](https://internals.rust-lang.org/u/Uther)\
**Post date:** [November 29, 2018, 1:41pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/22 "2018-11-29T13:41:58Z")

</div>

Too me 3-4 minutes is bad, but not a unbearable amount of time. To feel reassured, a progress indicator would be enough.

But with Trend Micro Office Scan, you really wonder if rustup is not hanging : it may take hours to install the docs.

---

<div class="post-metadata">

**Author:** ![passcod](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/passcod/32/9363_2.png) [@passcod](https://internals.rust-lang.org/u/passcod)\
**Post date:** [November 29, 2018, 9:55pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/23 "2018-11-29T21:55:36Z")

</div>

Unsure how that would affect the experience, but Windows does famously have their CHM format, which is essentially (I think) a zip of many HTML files, that are directly viewable natively without extracting. Could this be used?

---

<div class="post-metadata">

**Author:** ![DanielKeep](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/danielkeep/32/1332_2.png) [@DanielKeep](https://internals.rust-lang.org/u/DanielKeep)\
**Post date:** [November 29, 2018, 10:27pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/24 "2018-11-29T22:27:43Z")

</div>

> [@passcod](#):
>
> [...] Windows does famously have their CHM format, [...]

Which (AFAIK) is deprecated, and doesn't support Unicode. Also, the HTML Help viewer itself is pretty janky, what with it effectively being an embedded IE with a table of contents (good), and no tabs (very bad).

---

<div class="post-metadata">

**Author:** ![DrizztVD](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/drizztvd/32/4521_2.png) [@DrizztVD](https://internals.rust-lang.org/u/DrizztVD)\
**Post date:** [November 29, 2018, 11:13pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/25 "2018-11-29T23:13:50Z")

</div>

Of the docs, core has 10 123 files and std 2722. Removing all the files with little content in them is one workaround. Adding them together into a larger file is another. A script could do so, perhaps.

Windows Search file indexer is part of the problem.

Creating a PDF from the web pages could be possible: [https://helpx.adobe.com/acrobat/using/converting-web-pages-pdf.html](https://helpx.adobe.com/acrobat/using/converting-web-pages-pdf.html)

---

<div class="post-metadata">

**Author:** ![johnthagen](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/johnthagen/32/2005_2.png) [@johnthagen](https://internals.rust-lang.org/u/johnthagen)\
**Post date:** [December 1, 2018, 3:08am UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/26 "2018-12-01T03:08:05Z")

</div>

> [@Uther](#):
>
> To feel reassured, a progress indicator would be enough.

I created [an issue to consider creating a progress bar for `rustup` component installs](https://github.com/rust-lang/rustup.rs/issues/1557). While this in no way solves the problem, I think it is at least a step forward and (if not too difficult to implement) is universally helpful.

---

<div class="post-metadata">

**Author:** ![bluss](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/bluss/32/2264_2.png) [@bluss](https://internals.rust-lang.org/u/bluss)\
**Post date:** [December 1, 2018, 12:03pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/27 "2018-12-01T12:03:32Z")

</div>

There are a lot of extra files that redirect, like `from_mut.v.html` is a redirect to `fn.from_mut.html` and so on for every function and type, at least. Is there a plan to move away from these? It would be good to find some point where they can be removed or replaced with some built in rustdoc smarts.

---

<div class="post-metadata">

**Author:** ![Kroc](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kroc/32/1788_2.png) [@Kroc](https://internals.rust-lang.org/u/Kroc)\
**Post date:** [December 1, 2018, 6:38pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/28 "2018-12-01T18:38:54Z")

</div>

The docs directory can take up a lot of space too. If NTFS compression was enabled, it would take up a lot less space and less blocks would have to be actually written to disk, ultimately saving time.

---

<div class="post-metadata">

**Author:** ![RReverser](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/rreverser/32/2189_2.png) [@RReverser](https://internals.rust-lang.org/u/RReverser)\
**Post date:** [December 1, 2018, 10:15pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/29 "2018-12-01T22:15:21Z")

</div>

I’m lately mostly using [devdocs.io](http://devdocs.io) which just runs in the browser and allows precaching docs for various languages and libs (including Rust ones) for offline use by storing them in the IndexedDB. Could regular Rust docs switch to the same approach? Then we wouldn’t even need an installation step nor a problematic number of files. All that user would have to do is open [https://doc.rust-lang.org/](https://doc.rust-lang.org/) to have docs cache updated to the latest one.

---

<div class="post-metadata">

**Author:** ![DrizztVD](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/drizztvd/32/4521_2.png) [@DrizztVD](https://internals.rust-lang.org/u/DrizztVD)\
**Post date:** [December 2, 2018, 12:52pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/30 "2018-12-02T12:52:18Z")

</div>

> [@RReverser](#):
>
> I’m lately mostly using [devdocs.io](http://devdocs.io) which just runs in the browser and allows precaching docs for various languages and libs

That looks like an almost-good approach. It looks like devdocs is missing some of the docs though. Also, the caching is not 100% reliable it seems. this could be fixed, perhaps. It's similar to the http server approach in some ways.

---

<div class="post-metadata">

**Author:** ![kornel](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kornel/32/2711_2.png) [@kornel](https://internals.rust-lang.org/u/kornel)\
**Post date:** [December 2, 2018, 2:58pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/31 "2018-12-02T14:58:45Z")

</div>

My initial thought was that’s it’s super tricky to make rustup “install” the offline docs in the browser and ensure they stay long enough… but that’s actually not necessary. We can assume Rust users will open the docs page anyway, and they’ll probably use it often enough to keep it cached.

So I like that. It entirely shifts the problem from “docs are slow to install” to “docs don’t even need an install”.

---

<div class="post-metadata">

**Author:** ![DanielKeep](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/danielkeep/32/1332_2.png) [@DanielKeep](https://internals.rust-lang.org/u/DanielKeep)\
**Post date:** [December 2, 2018, 3:29pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/32 "2018-12-02T15:29:40Z")

</div>

The whole point of installing docs locally is to… install them locally. For when you don’t have a network connection, or for computers that don’t/aren’t allowed to have unfettered internet access.

Relying on an unaffiliated, third-party web service that only serves the current stable docs (which might or might not be what you’re using), in an unfamiliar structure, and which has an apparently unreliable caching system would seem to defeat the purpose.

---

<div class="post-metadata">

**Author:** ![kornel](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kornel/32/2711_2.png) [@kornel](https://internals.rust-lang.org/u/kornel)\
**Post date:** [December 2, 2018, 3:31pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/33 "2018-12-02T15:31:29Z")

</div>

I’m not talking about the devdocs service, but about making the official docs.rlo work offline. This can be achieved by adding an offline-caching service worker to the official docs page.

To me that’s even better than having docs installed offline, because the offline docs are a separate thing, opened with another command. So this:

1. Try docs.rlo
2. Oops, I’m offline
3. Use `rustdoc doc`

can be simplified to:

1. Try docs.rlo. Keeps working offline

(and `rustdoc doc` can be changed to open docs.rlo URL)

---

<div class="post-metadata">

**Author:** ![leonardo](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/leonardo/32/1344_2.png) [@leonardo](https://internals.rust-lang.org/u/leonardo)\
**Post date:** [December 2, 2018, 4:14pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/34 "2018-12-02T16:14:48Z")

</div>

> [@johnthagen](#):
>
> I created [an issue to consider creating a progress bar for `rustup` component installs](https://github.com/rust-lang/rustup.rs/issues/1557)

That's far beside the point. The problem I am seeing is: at the end of the updating done by Rustup it hangs. The CPU and disk usages are both zero. I don't know what's happening but it's not copying files, nor scanning them. And I've kept the shell open for hours with no changes. I have reported this here:

> <https://github.com/rust-lang/rustup/issues/1464>
>
> On my corporate laptop, rust-docs takes a very long time to install but the proc…ess manage to complete.
> The long time is due to bad SSD + encryption + McAfee anti virus I think.
> 
> The issue is that rustup doesn't end after the display of the toolchains version at the end of the update process. Had to kill it, and if I run \`rustup update\` again, everything is up to date.
> 
> So no big deal, but strange nonetheless. Looks like a timeout of somekind.
> 
> Windows 7 64 bits, powershell 5

And I am thinking about reopening that issue.

---

<div class="post-metadata">

**Author:** ![johnthagen](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/johnthagen/32/2005_2.png) [@johnthagen](https://internals.rust-lang.org/u/johnthagen)\
**Post date:** [December 2, 2018, 7:12pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/35 "2018-12-02T19:12:23Z")

</div>

> [@leonardo](#):
>
> The problem I am seeing is: at the end of the updating done by Rustup it hangs. The CPU and disk usages are both zero. I don’t know what’s happening but it’s not copying files, nor scanning them. And I’ve kept the shell open for hours with no changes

Interesting, that hasn't been my experience with the problem (for me there is clear CPU and disk activity during `rust-docs` install, it just takes a super long time). I agree a progress bar would probably not be helpful in that situation.

[I added this data point to the current open issue](https://github.com/rust-lang/rustup.rs/issues/1540#issuecomment-443533441) so that it's not lost.

---

<div class="post-metadata">

**Author:** ![RReverser](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/rreverser/32/2189_2.png) [@RReverser](https://internals.rust-lang.org/u/RReverser)\
**Post date:** [December 2, 2018, 7:39pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/36 "2018-12-02T19:39:57Z")

</div>

Yep, this is what I was suggesting too, not [devdocs.io](http://devdocs.io) specifically, but rather same browser-based offline approach for the official [docs.rust-lang.org](http://docs.rust-lang.org).

---

<div class="post-metadata">

**Author:** ![DanielKeep](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/danielkeep/32/1332_2.png) [@DanielKeep](https://internals.rust-lang.org/u/DanielKeep)\
**Post date:** [December 2, 2018, 10:49pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/37 "2018-12-02T22:49:24Z")

</div>

You appear to have ignored my first paragraph:

> For when you don’t have a network connection, or for computers that don’t/aren’t allowed to have unfettered internet access.

(Even that's ignoring that I've never seen a "works offline" website that actually reliably worked offline, but I've been avoiding that because it's not as strong a point.)

Also, you're projecting your own behaviour to invalidate others' arguments. Here's how _I_ use docs:

1. Type "rustdoc blah" into address bar, which opens the local docs and searches for "blah".

Adding caching to the docs website is an entirely reasonable thing to do. It also _in no way_ addresses the need for local docs, nor does it address them being slow to install on Windows.

Let me put it like this: people are complaining that the city has an issue with the main highway being highly congested as people try to drive to work. There are suggestions of enforced car pooling, adding more public transport, adding more roads...

You're suggesting outsourcing all jobs in the city to China. Yes, that _would_ solve the congestion problem, but conveniently ignores why people want jobs in the first place.

---

<div class="post-metadata">

**Author:** ![GuillaumeGomez](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/guillaumegomez/32/2510_2.png) [@GuillaumeGomez](https://internals.rust-lang.org/u/GuillaumeGomez)\
**Post date:** [December 4, 2018, 2:57pm UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/38 "2018-12-04T14:57:16Z")

</div>

Such files shouldn’t be generated anymore. Could you open an issue about it please?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [March 25, 2019, 8:31am UTC](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917/39 "2019-03-25T08:31:13Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

[Previous page](https://internals.rust-lang.org/t/installing-docs-is-slow-on-windows/8917.md?page=1)
