mono/MonoGame — pull request #2087 by sulix (2013-10-15 06:31:59+00:00)
Title: Make SpriteBatch.DrawString() an atomic operation.

SpriteBatch.DrawString() is _really_ slow when SpriteSortMode is "Immediate", as it flushes after every character. If we treat DrawString as a single Draw call, and flush after all characters are drawn, we can reduce the number of GL calls drastically and get a significant performance improvement.

This reduces number of draw calls by ~90% in some text-heavy scenes, without (as far as I can tell) diverging from the Xna spec. Doesn't seem to break anything in the MonoGame tests, either!

-- David