your best bet is to optimize as you're programming. don't wait till the end to try it.
my personal opinion is that optimize moves stuff around and if you haven't labeled your features very specifically it's very hard to track exactly what's going on. i tried it a few times and decided the few seconds I might gain was too much headache.