4 ms·
In my experience, most front end performance problems are just unoptimized assets, or huge JS bundles. After that, there's issues where you're doing a lot of un
by rhinoceraptor 7y ago
In my experience, most front end performance problems are just unoptimized assets, or huge JS bundles. After that, there's issues where you're doing a lot of unnecessary rendering, for example in a React app, a Redux mapStateToProps function that isn't memoizing an array map, which is causing the whole subtree to re-render on every state update. The only time I even needed algorithmic complexity was implementing a drag and drop control, for a list that could have several hundred thousand elements, and my naive implementation was n^2.
- jimbokun 7y ago> that isn't memoizing an array map "memoizing" is a pretty computer-sciencey word, so not implementing a data structure exactly, but still requires knowledge beyond "plug these APIs together." > The only time I even needed algorithmic complexity was implementing a drag and drop control, for a list that could have several hundred thousand elements, and my naive implementation was n^2. And if you didn't have an intuition for algorithmic complexity, how long would it have taken you to figure out the problem? And how many times have you instinctively avoided having an explosion in algorithmic complexity, by intuitively picking a suitable data structure or algorithm?