With the switch to pkg.go.dev (which in itself I quite like after getting 
used to it), the view-source links also changed from the golang.org source 
viewer, which was fast, to cs.opensource.google, which is rather slow.

For example, here is the code I've been looking at just now, compared to 
GitHub.com:

* 
https://cs.opensource.google/go/go/+/refs/tags/go1.17:src/os/exec/exec.go;l=189 
-- this loads in 4-5 seconds for me, with two client-side "loading..." 
states shown
* https://github.com/golang/go/blob/go1.17/src/os/exec/exec.go#L189 -- this 
loads in 1-1.5 seconds, with no loading states

I believe GitHub is faster because it serves the code in the initial HTML 
response, whereas cs.opensource.google serves a bunch of JavaScript that 
(after a couple of steps) loads the source. I believe the golang.org source 
used the GitHub approach -- at least, it was similar speed to GitHub so I 
never noticed this or needed to check.

I'm located in New Zealand, so it is no doubt further away from their 
origin servers than Google employees testing this stuff. (I asked a 
colleague from Australia, and he gets ~5s for cs.opensource, ~1s for 
GitHub.) I have a fast internet connection. The tests above are in the 
latest Firefox under Linux, but I've also tested using Chromium and get 
very similar results (on my first go in Chromium, which didn't have any 
cached, it was ~8s for cs.opensource.google and ~2s for GitHub, after that 
it was similar to the above).

It's frustrating, because most 3rd party packages (hosted on GitHub) get 
the faster GitHub view-source experience, but the core stdlib gets the slow 
experience!

Someone has suggested moving to GitHub in this issue: 
https://github.com/golang/go/issues/47202 ... however, it was more about 
the UI and got closed with "if you have suggestions for 
cs.opensource.google, use the Send Feedback button". I submitted feedback 
using that button, though I doubt that'll cause anyone to do a major 
rewrite of their architecture.

It seems to me that pages taking 4x as long to load is a series regression 
that hurts usability, at the very least outside the U.S. I use those stdlib 
source links a lot, and it's a bit of a killjoy to wait 4-8s each time.

I'm happy to open a new issue on this, but thought I'd see if others have 
input first.

-Ben

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/2e87b2f4-6828-44f9-807c-a83b08671d3an%40googlegroups.com.

Reply via email to