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
Loading
Please register or sign in to comment