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

Skip to content
Commit cdd3253d authored by James Lemieux's avatar James Lemieux
Browse files

Reduce memory churn for running stopwatches and timers

Bug: 28065873

String.format(...) was being called in a tight loop to format various
times (e.g. lap times, accumulated times, etc) when laps exist. This produces
more garbage for the VM to collect than is necessary. Formatting the
times directly into a reusable StringBuilder significantly reduces the
memory churn and removes intermittent GC pauses on older platforms
and low-memory devices.

Change-Id: Iad574cea7f827623bb4854458d43df76967d8c62
parent eb6c586a
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