Here is a goal: How to prevent muscle pain during a workout?

Which way makes more sense to accomplish this goal?

Select from the following. (I) Before starting your workout, warm up your muscles for at least 10 minutes; (II) After starting your workout, warm up your muscles for at least 10 seconds;
(I)