I am trying to batch-add several thousand spans to a SpannableStringBuilder
in an EditText
(obtained via getText()
).
This is slower than I would like. Profiling has shown that the vast majority of the time is being spent in DynamicLayout.reflow
. Is there a way to block the layout reflow until I am done adding spans?