Our text shaping caches can get huge right now, and we could implement smarter ways to limiting their size. Suggestions for how to limit it are here and in the comments above.
I suggested per-glyph cache sizing, but that won't fix very large Editor content or Labels, right? Perhaps this issue should (also) be about breaking up text layout into re-usable chunks, whether that be paragraphs, lines or something else. Laying out text in smaller chunks avoids the excessive cache use, as well as improves cache hit rate.