

Optimize Code or Upgrade Memory? - ConfusedPiddler

Myself and my partners are building a very large online comparison site.<p>There are currently millions of products in the site and when we move to compare other things there could theoretically be 100 million or more.<p>The database is taking a hammering at the moment and the site keeps going down.<p>My partner is a tech nerd and wants to throw more hard drives and ram at it but i want him to optimize the code more.<p>Memory and ram is very cheap now so this is actually a good short term solution and we will need to upgrade eventually anyway.<p>My problem is that i personally think even though the memory and ram is a cheap solution we should spend the time to optimize the code a lot more even though this could cost many expensive hours of work combined to a few dollars for more ram.<p>What does Ycombinator think?
======
kls
Do you have new features that could be implemented with that time?

There are a lot of other variables as well, but at a high level, if there are
new features that could generate revenue, then I personally would throw
hardware at the problem while building an iterative plan to deal with
optimization.

------
mrb
It is not an either/or choice. Sometimes you need to do both: throw hardware
at the pb _and_ optimize the code.

Sometimes you need do do everything possible to scale up.

------
msahil
Do some quick tests on your app to figure out what part of your app is the
bottleneck. Rememeber the 80/20 rule applies here as well. You might get a lot
of performance improvement by focussing only on few key areas. DO NOT, EVER,
OVER OPTIMIZE YOUR APP. If you need to spend lot of time to rework then do it
in phases rather than taking a big bang approach

------
lsb
What does "my partner is a tech nerd" mean?

Does he know what he's talking about, when it comes to code?

Do you know what you're talking about, when it comes to code?

Who knows more?

Why do you not trust his suggestion to throw more hardware at the problem?

Why does he think more hardware will matter?

------
dholowiski
Both.

Never underestimate the effect of speed on traffic. Throw everything you can
at it.

------
sohn
Both.

