diff --git a/CHANGELOG.md b/CHANGELOG.md index a31e600..d8dda3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ Improvements - Improved EnumHelper.GetValues signature to return an array - Allow using external gesture handling alongside InputHandler through ExternalGestureHandling - Discard old data when updating a StaticSpriteBatch -- Drastically improved StaticSpriteBatch batching performance +- **Drastically improved StaticSpriteBatch batching performance** Fixes - Fixed TokenizedString handling trailing spaces incorrectly in the last line of non-left aligned text diff --git a/MLEM/Graphics/StaticSpriteBatch.cs b/MLEM/Graphics/StaticSpriteBatch.cs index fec80ac..e251fc6 100644 --- a/MLEM/Graphics/StaticSpriteBatch.cs +++ b/MLEM/Graphics/StaticSpriteBatch.cs @@ -43,6 +43,7 @@ namespace MLEM.Graphics { private readonly SpriteEffect spriteEffect; private readonly List vertexBuffers = new List(); private readonly List textures = new List(); + // TODO this can still be optimized by not giving items with a unique depth a single-entry set immediately private readonly SortedDictionary> items = new SortedDictionary>(); private IndexBuffer indices;