Optimal life-history strategies are those that best allocate finite environmental resources to competing traits. We used the geometric framework for nutrition to evaluate life-history strategies followed by Drosophila melanogaster by measuring the condition-dependent performance of life-history traits, including the morphology of male secondary sexual characters, sex combs. We found that depending on their rearing environment flies faced different forms of trait trade-offs and accordingly followed different life-history strategies. High-energy, high-carbohydrate, low-protein diets supported development of the largest and most symmetrical sex combs, however, consistent with handicap models of sexual selection these foods were associated with reduced fly survival and developmental rate. Expressing the highest quality sex combs may have required secondary sexual trait quality to be traded-off with developmental rate, and our results indicated that flies unable to slow development died. As larval nutritional environments are predominantly determined by female oviposition substrate choice, we tested where mated female flies laid the most eggs. Mothers chose high-energy, high-protein foods associated with rapid larval development. Mothers avoided high-carbohydrate foods associated with maximal sex comb expression, showing they may avoid producing fewer 'sexy' sons in favour of producing offspring that develop rapidly.