I'm in Santa Clara, CA. Just a handful of miles away from Google
headquarters. Your two links exhibit orders of magnitude differences in
load time for me. Using the Chrome browser developer tools display shows
several errors that are likely the cause of the difference in load time; at
least for me. For example:

Access to XMLHttpRequest at 'https://play.google.com/log' from origin '
https://cs.opensource.google' has been blocked by CORS policy: The
'Access-Control-Allow-Origin' header has a value 'http://play.google.com'
that is not equal to the supplied origin.

On Wed, Aug 25, 2021 at 6:12 PM ben...@gmail.com <benh...@gmail.com> wrote:

> 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.
>
> --
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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/CABx2%3DD8TzDcUPMUN%3DWoCXeWYcCB47pPi1FCRJMBspErYmTVUqw%40mail.gmail.com.

Reply via email to