News for hackers. Stuff that matters.
Re:Optimize for now! by sanj on Thursday March 06, 2008 @12:12PM (#130652)
I feel like this particular piece of advice should be post-fixed with "... but don't be stupid!"

In particular, keep an eye out for n^2 loops and the like. Watch for shard-jumping queries. Easy stuff like that can go a long way.

Re:Optimize for now! by t0pj on Thursday March 06, 2008 @08:58PM (#130984)
Nothing like "jumping the shard", aye?
Re:Optimize for now! by mrtron on Thursday March 06, 2008 @01:04PM (#130690)
And keep a list of potential problems that won't scale.

'Hey we serialize a list of ALL users for this...that won't scale!'

Re:Optimize for now! by apathy on Friday March 07, 2008 @11:44AM (#131267)
Yes it will, if you break it up onto multiple shared memcached servers. Or re-think how you're serializing it. Or why. Or use a distributed hash table (although if you own all the machines, memcached is easier and faster to ramp up).

Basically, all of these exceptions people are cleverly bringing up are exactly the sorts of things that get in the way. Do everything well enough to get a usable product. Throw it out in front of customers. If you need to make it better because people are beating down the door, go for it; that's a much better problem to have than a scalable but unused resource soaking up your operational budget.

Re:Optimize for now! by bayareaguy on Thursday March 06, 2008 @04:16PM (#130835)
Agreed. I'd add linear lookups to that list since they easily lead to n^2 when someone comes along later on and puts your lookup inside a loop of their own.
Re:Optimize for now! by sanj on Friday March 07, 2008 @10:38AM (#131217)
It seems like there needs to be a list of these.

In another thread:

http://news.ycombinator.com/item?id=131216