News for hackers. Stuff that matters.
Re:Evergreen: a React UI Framework built by Segment by sgt on Wednesday October 17, 2018 @01:37AM (#18236365)
There may be some fast components in the Reddit web app, but I think there must be a valid reason why so many users are switching to the old Reddit (not just because of the way it looks, but due to performance complaints). I just went in and even scrolling through Reddit comments is laggy. Switching to old mode is like day and night.
Re:Evergreen: a React UI Framework built by Segment by wp381640 on Wednesday October 17, 2018 @03:42AM (#18236988)
they're sticking with the old reddit because the information density is much higher. it's a design problem.
Re:Evergreen: a React UI Framework built by Segment by nik736 on Wednesday October 17, 2018 @04:55AM (#18237331)
Not only that, for me in Safari the new reddit barely works and is not loading things very fast or sometimes at all.
Re:Evergreen: a React UI Framework built by Segment by wallawe on Wednesday October 17, 2018 @11:12AM (#18239827)
This could also be due to a poor implementation of event listeners for scrolling, e.g. not throttling, which isn't necessarily a React issue.
Re:Evergreen: a React UI Framework built by Segment by wild_preference on Wednesday October 17, 2018 @12:04PM (#18240384)
Good point.

I built a SPA recently and learned pretty quickly to replace `on('scroll', handler)` with a set-flag-and-sweep-at-slower-interval solution to bring down CPU usage.

While something like React alone isn't slow, building a SPA means you're taking on a lot more responsibility, and there's a lot more things that can go wrong.

Even something like "when user clicks an item, make loader spin until server response, and then render the detail page with the data" can feel much, much slower even though it's not from a clock-time standpoint.

Aside: Using a slow device as your main testing device is a life-changer if you want to catch this stuff early. It's hard to ignore this stuff when you have to feel the pain yourself on every refresh. Good reason to always keep your old phone around.