Live data from Hacker News

How We Built the GitHub Globe

github.blog

81–90 of 107 posts

Re: How We Built the GitHub Globe

#81

Wow, hardware acceleration makes a big difference here. I'm on a recent top of the line macbook pro and it couldn't handle it without hardware acceleration turned on. I wonder if they can/should disable the feature if it's off?

I am curious, why do you have hardware acceleration turned off? To answer your question, the failIfMajorPerformanceCaveat flag allows sites to turn off their hardware accelerated features when hardware acceleration is off.

> failIfMajorPerformanceCaveat

This sounded like a joke, but I wasn't 100% sure.

It's a real thing (code from Stack Overflow):

  const context = canvas.getContext("webgl", {
    failIfMajorPerformanceCaveat: true,
  });
Pretty neat.

Re: How We Built the GitHub Globe

#86

Pretty clever using the timezone offset to approximate the user's location without using GeoIP. I hadn't noticed that but sure enough, my (approximate) location is in view first.

Clever but a bit lame given the fact that I guarantee your IP address is already analyzed from a bazillion angles (incl. GeoIP) way before it hits the frontend process. Not sure why they can't use that information.

It‘s because i could see your pull request on this globe. If they use GeoIp they tell me where you live. But they use the user suplied location to not tell me any secret i should not know. Its genious!

Re: How We Built the GitHub Globe

#87
post #3

Looks a lot like the globe on Stripe's homepage: https://stripe.com They even had a post about it, too: https://stripe.com/blog/globe

Nat joked about this when it launched: "The battle for webgl globe supremacy will bring peace in our time" -- https://twitter.com/natfriedman/status/1336331076503916545

FWIW I'm currently running a Twitter poll to see whose globe people like better. 8 hours in the votes are running 60% Github, 40% Stripe:

https://twitter.com/calcsam/status/1344396912896712706

Re: How We Built the GitHub Globe

#89
post #81

Earlier quoted context omitted.

I am curious, why do you have hardware acceleration turned off? To answer your question, the failIfMajorPerformanceCaveat flag allows sites to turn off their hardware accelerated features when hardware acceleration is off.

> failIfMajorPerformanceCaveat This sounded like a joke, but I wasn't 100% sure. It's a real thing (code from Stack Overflow): const context = canvas.getContext("webgl", { failIfMajorPerformanceCaveat: true, }); Pretty neat.

I thought it was a joke too. What an awful flag all around:

* Woefully ambiguous and underspecified - what is "major"? A 12 FPS drop compared to desktop? Below 30 FPS? Frame jitter outside a certain standard deviation? It will depend on the app (fast-paced frame-perfect game vs. "well I just want the animation to be smooth" necessarily have different requirements for performance), but this flag leaves it up to the browser to decide.

* Oh, it's meant as a general term for checking whether software acceleration and frame readback (and other yet unknown possible bottlenecks) are engaged, those are the "performance caveats" - but those are either "yes" or "no", there's no way to quantify that with "major", totally meaningless. Unless it's conditionally choosing to succeed even with software rendering if some unspecified performance threshold is met. The 2 sentences of documentation about this flag means I wouldn't know.

* If you Google the name of the flag, near the bottom of the first page you'll find an email thread where someone brought up points like this and was ultimately shot down and the flag pushed through because "the Maps team really needs this." The technical equivalent of legislating from the bench. I wish I could create new browser features to solve all my inconveniences too. Why the Maps team couldn't figure out how to measure the canvas FPS and degrade on their own is a mystery to me.

* To round it all out, the name is also really bad. "failIfMajorPerformanceCaveat" is a weird negative tense - why not "requireUnhinderedPerformance"? That's consistent with the universal standard of "require" (not "failIf", how goofy) and is a lot clearer about the supposed intention of the flag (to try to ensure performance similar to native GL rather than this ambiguous "performance caveats" thing).

Sorry, just a rant about shovelware in the browser stack.

Re: How We Built the GitHub Globe

#90
post #74
post #72

Earlier quoted context omitted.

FWIW, this only works for me in Chrome, not Firefox.

What doesn't work? Link, page, CSS? Everything seems to work for me. Firefox latest stable release

Like Normal_gaussian, it was just a static image. Works for me now, though. No idea what changed.
Post reply on HN