Crusher Development!

December 15, 2007

More performance plus a cast and a :^)

Filed under: cast, muni tracks, one handed typing, rails performance — Russell @ 5:23 am

Don’t try to gently glide your bike over MUNI tracks, because one time you will mess up and be allowed the pleasure of typing one handed (see picture). Perpendicular is the way to go.

bad :

=== -/:^)\-   /__:^(_.,’==
  ..crash..  

good :

||   ||
|| -/:^)\-   -/:^)\- ||
||   ..no problem..   ||

I’m also hoping for the universal health care here in SF for all us uninsured earth passengers.

:^) is better than : ) .. and when necessary use the clown hat because Cartman did <@:^)

Lastly .. rails performance boosts. Moral of the story is use :select so your objects aren’t bloated, avoid functions that filter records in a has_many relationship, and don’t be shy about selecting out things from joins to avoid code like page.owner.name which will do an extra query to grab the entire user record just for a name.

We had some code like user_page.invitations.yes_replies. Nice and clean, but all invitations are pulled, memory is gobbled away, and then filtered down to the yes replies. Fine for parties with 50 guests, but 1000 guests and monit starts doing more bouncing than we like to see.

Typing with one hand

Theme: WordPress Classic. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.