Performance issue: Frequently GC
Closed this issue · 1 comments
walfud commented
Tks for your nice code first, but...
while running your demo, I found the memory usage like this (tested on Genymotion 2.4 with intel acceleration, x64, android 5.1.0 on nexus 4):
I have fix that problem, pls see you pull request.
The work I did is:
1, Use a MutableForegroundColorSpan
to maintain the foreground color, instead new a ForeGroundColorSpan
every time.
2, Change the MutableForegroundColorSpan
object's color when needed.
Here is memory usage after my fix(tested on Genymotion 2.4 with intel acceleration, x64, android 5.1.0 on nexus 4):
matthewrkula commented
Fixed with c62c38f