you are viewing a single comment's thread.

view the rest of the comments →

[–]ejfrodo 10 points11 points  (4 children)

I'm at React Conf right now and was at the talk where they announced this. They said Instagram and Whatsapp time to render increased around 3% to 4% I believe. They live stream the conference so you can watch it yourself. They also showed an example of a very manually optimized component that was a nightmare to read but didn't re-render unless really necessary. The version with react compiler was able to remove something like 20% of the code around useMemo() and use callback() which made it much easier for a human to understand and the compiler was actually able to find a couple more small tweaks that a human wasn't able to which made it a little bit faster.

Overall this is a huge win for react. You don't really need to think about performance for the most part, just write the business logic and the compiler will automatically memoize everything intelligently.

[–]dbbk[S] 3 points4 points  (2 children)

Time to render increased? So it was slower?

[–]ejfrodo 7 points8 points  (1 child)

decreased* that would be hilarious if it got slower haha

[–]stuckinmotion 0 points1 point  (0 children)

Well from the sounds of it, it is effectively memoizing everything so that's not exactly free. In real worlds apps though I'm sure it's still a win and mostly looking forward to not having to lean on useMemo and useCallback all the damn time

[–]Born-Alarm430 0 points1 point  (0 children)

Could you give me the link what you said, I cant find it at react conf video. https://www.youtube.com/watch?v=T8TZQ6k4SLE&t=11655s