DEV Community

Discussion on: It Will Do vs It Will Scale

Collapse
 
simonhaisz profile image
simonhaisz

Oh man, I have lost track of the number of times I've seen stuff like this. And these performance problems always seem to pop up one of two ways - immediately or years after release.

I agree with your two points but I think #1 needs to go into more detail to help people understand which part of their code they need to think more about. I've often seen juniors, when they think about performance, get caught up on tiny details that the compiler will optimize away instead of the fact that their design performs an operation n times when it could easily do it once. And thinking about it doesn't always mean fix it. It is often acceptable to just document that something will not scale with the assumption about why it shouldn't need to. This is the good kind of technical debt - don't prematurely optimize.

Collapse
 
molly profile image
Molly Struve (she/her) • Edited

GREAT point! There's definitely an art form to knowing when to optimize something. I also think knowing when to do that comes with experience and it's something people shouldn't feel like they need to know right away when they start. I think you can get that experience by either witnessing the slow down yourself or hopefully by reading posts like this where you can learn about other people's experiences.