I prefer to saute the onions first. I find that onions are sweeter and more flavorful when they are caramelized, which can take some time. If you start the onions before the mushrooms, they'll have a chance to caramelize by the time the mushrooms are done cooking.