speed up tests+discussion

So, we've obviously done a bunch of work on this already.  I suspect that some of the biggest opportunities remaining are:

  1. getting rid of unnecessary time in defaults setting in Card.new.  We could do that by adding :skip_defaults to a gazillion test calls (though surely some of them need the defaults).  I'm guessing much of this will go away when we refactor permissions
  2. further optimizing card#save.  Most of the biggest gains there have been exploited, but I was using a fairly simple case -- there may be other opportunities for optimizing when saving plus cards, cards with many references, etc.
  3. selectively preloading the cache for some specs, but not all.  For the ones where it's unnecessary it slows things down, so it ends up being a wash.  But if we're able to pick and choose, I think we could do some good.
  4. spot optimizing, as suggested above.
So here's the question for the group: do we still want to consider #1 and #2 from the +solutions box above?  I'm not clear on whether those are still consistent with our approach.

I think my new take is that I'd rather spend the time building the new permissions system and then optimizing the tests to work with that.


What tools do we have for measuring performance? Both for tests and for more production like loads.

  --Gerry Gleason.....Thu Jan 06 10:47:46 -0800 2011


not enough. we use new relic, but have only the lowest level of support. I might be willing to invest in more. Lew has a benchmarking spreadsheet somewhere, though I think the old data may not be super useful, as I think it's based on running stuff on his old laptop.

  --Ethan McCutchen.....Thu Jan 06 11:41:08 -0800 2011


fwiw, I lowered this to "low" pri because I think testing performance is more or less under control now, but production performance needs to be a high priority for us. (which I think you were already implying)

  --Ethan McCutchen.....Thu Jan 06 11:42:27 -0800 2011


Yes, exactly. I think it is well under control for testing and that focusing on test performance could have you doing things that are bad for production performance.

When I get the current branch more under control, I may want to try to generate new data and compare to Lew's data for trends and just to be sure nothing has gotten too far out from what it was.

So if you have any useful links on this, please share. Should we have another ticket for production performance, maybe?

  --Gerry Gleason.....Thu Jan 06 13:12:11 -0800 2011


so...close this ticket and add another with the remaining stuff to do and this discussion?

  --John Abbe.....Sun Jan 23 00:40:04 -0800 2011


Sounds right to me.

  --Gerry Gleason.....Sun Jan 23 03:48:02 -0800 2011


further speed up tests

  --John Abbe.....Sun Jan 23 03:55:59 -0800 2011


So, what was actually done here? Just optimizing Card#save ?

  --John Abbe.....Sun Jan 23 04:01:13 -0800 2011