ui.Paragraph has a dispose() method, which TextPainter calls. Should MongolParagraph also add this? I'm not adding it yet because it would require looping through all of the _runs and disposing every Paragraph. Having these runs available potentially allows MongolParagraph to relayout itself when the height changes without having to recalculate every run. That's something that a normal Paragraph doesn't do. So it seems like a performance advantage to not dispose everything. But this is untested. Maybe disposing would be an advantage.
ui.Paragraph
has adispose()
method, whichTextPainter
calls. ShouldMongolParagraph
also add this? I'm not adding it yet because it would require looping through all of the_runs
and disposing everyParagraph
. Having these runs available potentially allows MongolParagraph to relayout itself when the height changes without having to recalculate every run. That's something that a normal Paragraph doesn't do. So it seems like a performance advantage to not dispose everything. But this is untested. Maybe disposing would be an advantage.