OK so I'm examining the Rust auto generated docs for the std lib (https://doc.rust-lang.org/std/index.html ) to see how it's done, but I mean like *really* examining it because I'm about to implement something similar. And my god it's masterfully done. Looks minimal but is sophisticated.
-
-
TBH I'm surprised we're still shipping the search index as JS literals. Switching from JSON to any binary format would probably substantially improve both parse times and file sizes
-
Yeah, I just did the first implementation of dumping the semantic analysis results to a pretty compact JSON file (it's far from complete info still), and for the std lib it's already 903KB. Even a simple piping through gzip brings it down to 1KB (!)
- 2 more replies
New conversation -
-
-
I took your suggestion and ran with it. So far total gzipped bytes for all std lib docs files is 400KB. That's main.js, data.js, index.html, no other files needed. Source listings not done yet, plan to keep that as separate .html pages.https://twitter.com/andy_kelley/status/1181423345759375360 …
-
Awesome. I still believe that a data file and a client side app would be way way smaller than our current piles of HTML, but haven’t been able to build something real enough to prove it. Might be interesting to compare what you have to a no-JS version...
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.