Wiktionary
yak shaving
n. 1 (context idiomatic English) Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem. 2 (context idiomatic English) A less useful activity done to consciously or unconsciously procrastinate about a larger but more useful task.