I think you should take food first. The idea being that no food + demand for nutrients (exercise) tells your metabolism that resources are scarce. This makes your metabolism burn protein from your body (muscles) instead of fat from your body or proteins from your food, so if you are trying to gain energy or lose weight, eating first will be better at kick starting your metabolism.