Been looking into it and yes, in Unity 6 at least, in this specific scenario, something is going wrong... Long text on a prefab causes a huge delay - Tried it both with a prefab that had a small amount of text and a big amount of text too - the small one was extremely bad, the big one still bad vs non-prefab text but still noticeably slower.
Found a thread here about the issue: https://discussions.unity.com/t/extreme-slowdown-traced-to-serializedobject-appl...
Seems like it's not specifically my fault, and the solution here is to not actually store any text on the mesh, just send it when it needs to be sent.
Still digging into this more though... The problem code I'm seeing is absolutely editor-only, a call from stm.OnInspectorGUI() triggering SerializedObject.ApplyModifiedProperties()... Both of these are only called in-editor and specifically if the inspector for the currently inspected object is open.
So... until Unity provides a way to work around this or a deep profiler that will actually tell me something I can fix, my advice is to not type a ton of text on the asset directly in the editor and instead have something else that will send text to the object. The prefab can be set up in advance, but the issue seems to just be editing a large amount of data in the inspector of a prefab in newer versions of Unity for whatever reason.
A dialogue manager would work for this, but if you want to edit text in the editor, here's a super-basic sample script to work around the issue... I'm not 100% sure why this works while the default inspector itself causes lag, but please try putting this on the same GameObject, and collapsing the inspector for SuperTextMesh. I seem to be able to edit text very smoothly with this method:
I'll keep thinking about how to work around this though as the issue is clearly something with the inspector for SuperTextMesh, since collapsing it and using this component instead has everything run smoothly... Will keep looking into that!
EDIT: more findings, it's for sure linked to serializedObject.ApplyModifiedProperties() - if I tell the STM inspector to return after the text field and call it immediately - there's still a delay. If I remove it... no delay, but the text of course doesn't update since ApplyModifiedProperties is needed to... apply the properties. So I think the extra code I wrote above just gets around this by... not using a custom inspector...? Doing even more digging...