3 ms·
This whole "don't do premature optimization" is one the worst creeds in software development, right below "just hack together a temporary MVP for now, we'll wri
by quantummkv 6y ago
This whole "don't do premature optimization" is one the worst creeds in software development, right below "just hack together a temporary MVP for now, we'll write a good one later"
As someone who spent weeks trying to optimize a react native app, believe me, this is not going to go the way you think it is. It never will. Not without rewriting half of your app and earning the ire of your customers for being a slow hog along the way.
> Memoizing a leaf component probably isn't worth doing
It isn't when you only have 10 components. By the time you have a thousand of them in a big app, you will have a thousand small performance paper cuts in you application. And they will bleed your app while you can do nothing but watch.
- davedx 6y agoWhat does your app do that you need to render a thousand on one screen? I'm genuinely curious
- quantummkv 6y agoNot exactly a thousand. That was a bit of a hyperbole. But I have used hundreds of components in some apps. Most of them were big enterprise apps that had a lot of input fields for data entry. Given the was data entry works in React, especially with the general form practices, it was a nightmare when I first started and was a follower of the entire premature optimization gospel. For a more similar and public example, just have a look at how sluggish the jira webapp feels.