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

Skip to content
Commit d2cbeb8c authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Reduce frequency of LongArrayMultistateCounter.incrementValues calls

This is an optimization that skips incrementing a multi-state counter
with an array of zeros. Adding a zero does not take much time,
but locking the java array in the JNI layer is expensive.

Bug: 395954049
Test: atest PowerStatsTests; atest PowerStatsTests:BatteryUsageStatsProviderPerfTest#getBatteryUsageStats_accumulated
Flag: EXEMPT bugfix
Change-Id: I5310a08bf8a56818ee3361097842f763f3c026ac
parent 726819d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment