Peace time is the best time to invest in military research because you'll be more prepared to secure an advantageous position when a conflict emerges. If you only invest during an in-progress conflict then what you're really doing is playing catch up.