Live data from Hacker News

Why is GitHub UI getting slower?

yoyo-code.com

91–100 of 123 posts

Re: Why is GitHub UI getting slower?

#91
post #4

Githubs performance has been rapidly degrading ever since they started rewriting everything in React. It's basically impossible to view diffs now because they often fail to load, render correctly, or just are incredibly slow.

There was a video recently talking about this with a good visualization [0]

The root cause of the problem is very fundamental to React and the nature of how the team designed the reactivity model. The TL;DR: React has an inverted model of state management [1].

In Vanilla, Vue, Svelte, Solid, any signals-based reactivity model, you explicitly opt-in to state changes by moving code into your reactive callback. In fact, in almost all of the code that you write, you typically explicitly opt-in to changes in state.

In React, you explicitly opt-out of state changes by moving code out of the reactive callback because the entire component function is the reactive callback (so any state in the path of that function that should not trigger a re-render has to be moved out via a hook).

This fundamental difference is what makes React hard to do well at scale because one needs to be very cognizant of where to place state inside a component and how to optimize for performance with memoization [2] (something Vue and Svelte developers pretty much never think about). The React team spent 2 years building the compiler to automatically manage memoization, but from the benchmarks I've seen, it's hardly made a difference.

In that time frame, Vue has been working on "Vapor Mode" [3] which bypasses the VDOM and brings it to parity with Svelte, Solid, and very close to Vanilla while still retaining a very easy to grok model of reactivity.

[0] https://youtu.be/INLq9RPAYUw

[1] https://chrlschn.dev/blog/2025/01/the-inverted-reactivity-mo...

[2] https://tkdodo.eu/blog/the-uphill-battle-of-memoization, https://tkdodo.eu/blog/the-useless-use-callback

[3] https://www.vuemastery.com/blog/the-future-of-vue-vapor-mode...

Re: Why is GitHub UI getting slower?

#92
post #4

Githubs performance has been rapidly degrading ever since they started rewriting everything in React. It's basically impossible to view diffs now because they often fail to load, render correctly, or just are incredibly slow.

I wonder if it's React. The GitHub app takes between 3 and 4 seconds to refresh the notifications, and I only have about 20 in my list.

Re: Why is GitHub UI getting slower?

#93
I made a competitor to GitHubs UI for Pull Requests (codeapprove.com)

It’s built in Vue. My first 5 or 6 attempts at writing the diff viewer were very slow when things got big. I optimized this a lot and now I’m pretty proud of how snappy it is.

I’m not saying this as a plug (this is mostly a passion project not a big business) but to say that it’s possible to make a snappy GitHub PR UI using a frontend framework on top of GitHub’s own APIs. You just have to care. It’s not clear that they care.

Re: Why is GitHub UI getting slower?

#94
post #27

Earlier quoted context omitted.

They used mostly vanilla JS for over a decade. They were early proponents of a technique they called PJAX which is actually pretty similar to how HTMX works: https://github.com/defunkt/jquery-pjax My hunch is that over time it became harder and harder for them to hire new frontend developers who didn't insist on building everything new in React and eventually they gave up.

I think it was two things: 1) The original web components proponents[1] there were very heavily into "vanilla" web components. Web components are low-level APIs and just don't have the ergonomics of frameworks without a library to help. For a few elements built by a few true believers, this is ok, but when you scale it out to every component in a complex app with company-wide teams you need the ergonomics and consist…

> 2) The GitHub Next team built their work in React because they required the ergonomics to move fast and they were operating independently from the production app teams. I think the first thing of theirs to be integrated was Projects, and they could probably show that their components had much better DX. Starting from the ergonomics argument, the hiring argument would take hold.

There's also an impression from outside that the GitHub Next team also got a large amount of pressure to dogfood LLM usage, especially in new feature building.

There seems to be a visible ouroboros/snowball effect that LLMs are causing that they were trained so much on React code that's what they know best and because that's what they know best the goal should be to move things to React and React Native to take the most advantage of LLM "speed and productivity boosts".

I'm currently a pawn that feels about to be sacrificed in a cold war happening in my own day job over how much we should move towards React to make executives and shareholders happier at our "AI all the things" strategy. Sigh.

Re: Why is GitHub UI getting slower?

#95
post #6

It's very obvious that they've unleashed a bunch of very junior developers on front end, it's I'm surprised that it still works. The previous AJAXed implementation had its haters, but at least it was very close to bare HTML on HTTP.

Don't forget many of those very junior developers they've unleashed on the front end is GitHub Copilot. Vibe coding is the new GitHub mandate, because they are serious about dogfooding.

Re: Why is GitHub UI getting slower?

#96
post #4

Githubs performance has been rapidly degrading ever since they started rewriting everything in React. It's basically impossible to view diffs now because they often fail to load, render correctly, or just are incredibly slow.

There was a video recently talking about this with a good visualization [0] The root cause of the problem is very fundamental to React and the nature of how the team designed the reactivity model. The TL;DR: React has an inverted model of state management [1]. In Vanilla, Vue, Svelte, Solid, any signals-based reactivity model, you explicitly opt-in to state changes by moving code into your reactive callback. In fact,…

Interesting to contrast that with the assessment of React, qua critique of the Observer pattern in Brandon Rhodes' 2022 design patterns talk: https://www.youtube.com/watch?v=pGq7Cr2ekVM?t=28m45s . (Notably, later in the talk when he describes the Mediator pattern with a GUI-motivated example, he preempts by saying "I know I just told you to use React"... but then the description ends up sounding to me very much as if React is an implementation of the Mediator pattern!)

Re: Why is GitHub UI getting slower?

#97

I suffer it and that’s why I’m building https://githero.app Btw, I worked at GitHub for 3 years and they are very aware that slowness is a big issue throughout the whole product. There was a year long cross team effort to improve things but the main goals were not achieved IMO and it shows.

What do you hope to offer that wouldn't be found in, say, GitLab?

Re: Why is GitHub UI getting slower?

#99
post #96

Earlier quoted context omitted.

There was a video recently talking about this with a good visualization [0] The root cause of the problem is very fundamental to React and the nature of how the team designed the reactivity model. The TL;DR: React has an inverted model of state management [1]. In Vanilla, Vue, Svelte, Solid, any signals-based reactivity model, you explicitly opt-in to state changes by moving code into your reactive callback. In fact,…

Interesting to contrast that with the assessment of React, qua critique of the Observer pattern in Brandon Rhodes' 2022 design patterns talk: https://www.youtube.com/watch?v=pGq7Cr2ekVM?t=28m45s . (Notably, later in the talk when he describes the Mediator pattern with a GUI-motivated example, he preempts by saying "I know I just told you to use React"... but then the description ends up sounding to me very much as if…

All modern FE frameworks are effectively observer patterns, it's that there are two camps on how those changes in the state are propagated.

In signals-based platforms (Vue, Svelte, Solid), the signal targets specific subscribers and callbacks where the developer has opted in to state changes.

In React, though `useEffect` looks a lot like Vue's `watch`, they behave entirely differently because the entire component is registered as the callback.

The code examples in my second link [1] above are worth a glance because it makes it very obvious how similar these libraries are when glancing at the code, but how different they are in terms of how they deliver update signals.

Re: Why is GitHub UI getting slower?

#100
post #71

There is a whole new paradigm in UX design now: get rid of immediate page changes and loading states and instead keep the user on the same page until things load, and show it when it's ready.

Modern browsers already do this by default with server-rendered pages. No JS hacks needed. (And the browser UI correctly indicates that it's in a loading state while it's loading.)

Modern browsers will even animate it between server-rendered pages with View Transitions CSS now.
Post reply on HN