Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 945ee9b1 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Bug 5250788: TextView gets slower as the text length grows

getSpans was called too many times in handleRun. Pre-compute the
subset of intersected spans and iterate over a subset of it instead.

Moving the instanceof test in getSpans after the other tests also
speeds things up a lot.

On a text with ~300 words, all with a span attached, getSpans went down
from 78% to 14% of the CPU usage.

Change-Id: I59bc44f610e9a548e0dcec68b180934da9e5c559
parent 5840639f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment