As a GM, is it bad form to ask for a moment to think when improvising?

As an amateur GM, I, like many other new GMs, often find myself having to improvise in the wake of unexpected player action.

In the past, my approach to this has been to rush to think of something on the spot, which often results in a poorly thought out, cheesy/cliche, or just plain boring response.

Would it be bad form if, when thrown a substantial curveball by the players (such as, for example, the party deciding to wait for enemies to push their position, as in this answer) I were to say to the party something like:

Okay guys, give me a minute to figure this out

Or would that be too jarring/immersion breaking for the players as it results in a sudden pause in play?