Most active commenters
  • const_cast(3)

←back to thread

446 points talboren | 32 comments | | HN request time: 1.184s | source | bottom
Show context
PedroBatista ◴[] No.45039192[source]
The Github website is slow everywhere. It is truly a piece of shit software both in terms of performance but also UX/UI and everything in between.

It's a product of many cooks and their brilliant ideas and KPIs, a social network for devs and code being the most "brilliant" of them all. For day to day dev operations is something so mediocre even Gitlab looks like the golden standard compared to Github.

And no, the problem is not "Rails" or [ insert any other tech BS to deflect the real problems ].

replies(17): >>45039249 #>>45039365 #>>45039680 #>>45039841 #>>45040328 #>>45040430 #>>45041105 #>>45041125 #>>45041207 #>>45042280 #>>45042385 #>>45044131 #>>45046133 #>>45048521 #>>45050100 #>>45051138 #>>45062005 #
bob1029 ◴[] No.45039249[source]
> And no, the problem is not "Rails"

The problem is they abandoned rails for react. The old SSR GitHub experience was very good. You could review massive PRs on any machine before they made the move.

replies(10): >>45039310 #>>45039407 #>>45039686 #>>45040388 #>>45041936 #>>45043631 #>>45048845 #>>45049190 #>>45051019 #>>45051373 #
1. Zanfa ◴[] No.45040388[source]
I’m pretty sure they used to do syntax highlighting on the server before and it was fast. Now they send down unhighlighted text that seems to choke the browser with anything but the smallest diffs.
replies(2): >>45041029 #>>45041118 #
2. sidewndr46 ◴[] No.45041029[source]
Whoever had a KPI for improving server performance and decreasing cost got their promotion that quarter, that is for sure.
replies(1): >>45042736 #
3. slt2021 ◴[] No.45041118[source]
the problem is developers having fast modern machines.

if they were forced to use slow machines, they would not be able to put out crap like that

replies(6): >>45041255 #>>45041536 #>>45043882 #>>45046904 #>>45047482 #>>45051651 #
4. __alexs ◴[] No.45041255[source]
It is garbage even on my extremely high end desktop PC.
5. mrbombastic ◴[] No.45041536[source]
M4 macbook pro and almost unusably slow
replies(1): >>45043661 #
6. tempest_ ◴[] No.45042736[source]
Servers cost money, the client is free (and pays you sometimes)!
replies(1): >>45047472 #
7. lowwave ◴[] No.45043661{3}[source]
Ah the wonders of SPA! I know there are lighter ones, but it is not the first time hearing things like React being slow. Of course, when one start to do sntax highlighting on the client side....
replies(2): >>45044718 #>>45044747 #
8. can16358p ◴[] No.45043882[source]
While I agree about devs should be testing on slow devices, the particular target audience of the site generally have pretty decent machines (including two that I have) and there isn't much reason for the site lag. It's not really doing any 3D rendering with complex shaders or video filtering; it just shows changed lines in two files. That shouldn't lag.
replies(2): >>45051252 #>>45061168 #
9. humpty-d ◴[] No.45044718{4}[source]
Various comments and links throughout the discussion of this post indicate that the problem is a mix of the sheer number of nodes and css. It has nothing to do with React or being a React SPA, which it's also not, unless you have some proof otherwise.
replies(1): >>45048806 #
10. Tadpole9181 ◴[] No.45044747{4}[source]
> When native software is slow, it's bad software. When web software is slow, react is bad software.

This is such a tired trope.

replies(1): >>45047513 #
11. ponector ◴[] No.45046904[source]
Only in the ideal world, where developers test results of their work on their machines. Test for real, with real db, not with empty or mocks.
12. const_cast ◴[] No.45047472{3}[source]
The client costs money too, opportunity cost.

Which, unfortunately, cannot be measured :( so no KPIs. Darn!

Its all fun and games until you cut quality over and over so much your customers just leave. Ask Chrysler or GE. I mean they must have saved, what, billions across decades? And for free!

Well... um... not free actually, because those companies have been run into the ground, dragged through hell, revived, and then damned again.

replies(3): >>45048359 #>>45068883 #>>45078001 #
13. const_cast ◴[] No.45047482[source]
I don't think so, I think the problem is their devs work on tiny play pretend codebases or micro service architecture.

GitHub is big software, but not that big. Huge monorepos and big big diffs grind GitHub to a pulp.

replies(1): >>45047645 #
14. const_cast ◴[] No.45047513{5}[source]
Its not really a trope, the opposite is much more common. People are much more quick to mindlessly blame SSR for slowness like with ROR or PHP.

The reality is both can be slow, it depends on your data access patterns, network usage, and architecture.

But the other reality is that SPAs and REST APIs just usually have less optimal network usage and much worse data access patterns than traditional DB connected SSR monoliths. Same goes for micro service.

Like, you could design a highly scalable and optimal SPA. Who's doing it? Almost nobody.

No, instead they're making basically one endpoint per DB table, recreating SQL queries in client side memory, duplicating complex business logic on the front and back end, and sending 50 requests to load an dashboard.

replies(1): >>45049456 #
15. Atotalnoob ◴[] No.45047645{3}[source]
GitHub runs a mostly monolithic architecture
replies(1): >>45050115 #
16. RedShift1 ◴[] No.45048359{4}[source]
MBA's ruin everything
replies(3): >>45050869 #>>45072442 #>>45078015 #
17. bythreads ◴[] No.45048806{5}[source]
React and the most commonly used pattern inherently promotes an way to complex html Node structure and shitty css, especially if stuff like tailwind is used.

Now you CAN so it so that is not the case, but tbh i have never seen that in the wild -

replies(1): >>45049318 #
18. troupo ◴[] No.45049318{6}[source]
Lol. If anything, Tailwind isn't shitty CSS (because it's a very limited number of classes) unlike the gazillion one-off classes that CSS-in-JS or even BEM encourages

Edit: here's a good investigation on a real-enough app https://www.developerway.com/posts/tailwind-vs-linaria-perfo...

replies(1): >>45049443 #
19. typpilol ◴[] No.45049443{7}[source]
Yes what's with his comment?

Tailwind is probably one of the best considering you can use Vite to literally strip out all unused css easily.

And I think tailwind v4 does this automatically

20. whstl ◴[] No.45049456{6}[source]
React also has a class of problems that doesn't really happen in other types of apps: re-renders.

Even other frameworks like Vue.js, Solid or Svelte don't really suffer from it as much. It simply happens a couple order of magnitudes more often in React than any other framework.

21. guappa ◴[] No.45050115{4}[source]
So? You can still do a PR of 1 line and the diff will only show that 1 line.
22. jeltz ◴[] No.45050869{5}[source]
Opportunity costs is something they are taught about in school but somehow seem to always forget about. I think it is more a question about incentives for the roles MBAs are usually hired into. Either that or the lack of knowledge of the actual product makes them too detached.
replies(1): >>45051833 #
23. m0llusk ◴[] No.45051252{3}[source]
I code on ten year old laptops and use Bitbucket CLI in part because of all this.
24. aleph_minus_one ◴[] No.45051651[source]
> the problem is developers having fast modern machines.

> if they were forced to use slow machines, they would not be able to put out crap like that

Lots of developers are rather obsessed with writing good, performant code. The problem is rather that many project managers do not let them do these insane optimizations because they take time.

The only things that forcing developers to use slow machines will bring is developers quitting (and quite a lot of them would actually love to see the person responsible for this decision dead (I'm not joking) because he made the developers' job a hell on earth).

What you should rather do if you want performant software is to fire all the project managers who don't give the developers the necessary time (or don't encourage the developers) to write highly optimized code (i.e. those idiot project managers who argue with "pragmatism" concerning this point).

replies(1): >>45052060 #
25. MichaelZuo ◴[] No.45051833{6}[source]
Who would even hire an MBA to improve such difficult to measurre things?

Maybe it will make a significant enough cumulative impact 5 years later that it can actuallly be noticed and defended in a meeting against other priorities.

But I’ve never heard of anyone hiring someone on minimum wage and deferring a huge bonus to 5 years later.

Even if it does makes a big impact, would anyone even take a such a job?

26. otabdeveloper4 ◴[] No.45052060{3}[source]
> because they take time

No they don't. It's literally just a skill issue.

replies(1): >>45052460 #
27. aleph_minus_one ◴[] No.45052460{4}[source]
Fast algorithms are often more complicated.

To give just one simple example: to get the textbook complexity bound for the Dijkstra algorithm, you need some fancy mergeable heap data structures which are much more complicated, and thus time-intense to implement than the naive implementation.

Or you can get insane low-level optimizations by using the SIMD instructions that modern processors provide. Unluckily, this takes a lot of time and leads to code that is not easy to understand (and thus not easy to write) for "classically trained" programmers.

Yes, you indeed need a lot of skills to write such very fast algorithms, but even for such ultra-smart programmers, finding and applying such optimizations need a lot of development time, which is why this is often only done for code parts that are insanely computation-intense and performance-critical such as video (and sometimes audio) codecs.

replies(1): >>45054315 #
28. slt2021 ◴[] No.45054315{5}[source]
the most common cause is architecture, not algorithms
29. chipsrafferty ◴[] No.45061168{3}[source]
It should be the same speed as running git diff in your console. And it should support histogram style diff...
30. rapind ◴[] No.45068883{4}[source]
But taxpayers keep bailing them out... so how did they lose?
31. godelski ◴[] No.45078001{4}[source]

  > Which, unfortunately, cannot be measured 
This is such a subtle but important thing that so many people do not understand about data analysis. It's even at the heart of things like survivor bias[0]. Your measure is always a proxy and this proxy has varying degrees of alignment with what you want to measure.

I know everyone knows the cliche "The devil is in the details" but everyone seems to continually make these mistakes because nuance is hard. But then again what is a cliche if not words of wisdom that everyone can recite but fail to follow?

  > Its all fun and games until you cut quality over and over so much your customers just leave.
The alternative is you develop a Lemon Market. Which is a terrible situation for all parties involved. Short term profits might be up but these are at the loss of much higher long term rewards.

[0] You infer where the downed planes were shot through the measures you can make on recovered planes. But that is very different than measuring where downed planes were shot. You can't just take the inverse of the returned planes and know where to add plating from there.

32. godelski ◴[] No.45078015{5}[source]
To be fair, many programmers are part of the problem too. But then again, it is getting harder to differentiate some programmers from MBAs...