How to (automatically) determine a visually appealing line spread?

I'm writing a "larger" document with a lot of mathematics. Occasionally, I use a notation like

p \xrightarrow{\mathcal A^X} q

which produces tall lines. LaTeX increases the line spread for those lines resulting in a very uneven layout where some lines have normal line spread and others don't.

I currently "solved" the problem by increasing the line spread to 1.2 using the setspace package. Below you find a small example how the increased line spread looks like.

It seems to be OK now, but I feel that a lline spread of 1.2 is too much. Is there a way to (automatically) determine the "smallest" line spread that prevents different line spreads in a document without a try-and-error approach? If not the "smallest", a visually more appealing line spread is of course also OK.

I searched the web and tex.stackexchange for answers but could not find a satisfactory one. I hope you can help me.

-
can't you use display math? –  David Carlisle Feb 14 '13 at 8:47
You could try with \tracingoutput1 \showboxbreadth\maxdimen \showboxdepth4 \lineskip1.42pt and then grep the log for \glue(\lineskip) 1.42, adjusting the spread in a programmed loop outside the TeX process. –  Stephan Lehmke Feb 14 '13 at 9:06
In my opinion, lines having different lineskip in such a dense mathematical text is not a problem. Nobody really reads the text quickly to notice this while actually reading it. And a page with so much math will hardly be really visually appealing, no matter the even or uneven lineskip. I suggest using slightly increased linespread, to value like 1.07, so that the text is "airy" in general and a bit larger line skip than this will then be almost unnoticed. –  yo' Feb 14 '13 at 9:24
Also, if this is a typical notation you use a lot, you could consider making a special macro for it which lowers the arrow, for instance. –  Stephan Lehmke Feb 14 '13 at 9:30
You can also try the command \smash to force the line spacing to ignore the math boxes. That's for cases when the line spacing increase is rather unnecessary. –  T. Verron Feb 14 '13 at 9:35