I didn't want to tackle this yet though, since I don't know if doing this optimization can handle passivation and activation properly.  It needs some additional thought.