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

Commit 1ee63dec authored by Manjeet Rulhania's avatar Manjeet Rulhania Committed by Android Build Coastguard Worker
Browse files

AppOps: Remove String.intern() when reading from database

Traces show significant lock contention on the global InternTable lock
during app ops database reads. This occurs when multiple threads attempt
to intern strings simultaneously.

The use of String.intern() for values read from the DB appears to be a
premature optimization. The performance impact from lock contention
outweighs the potential memory savings.

Also, adding increment check to optimize increaseXXX methods in
HistoricalOps.

Bug: 446014831
Test: AppOpHistoryHelperTest
Test: HistoricalRegistryTest
Flag: EXEMPT BUGFIX
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:2225d2a2c9052ad0665ccee36f79aae222c84ee6
Merged-In: I057b60f40ec63a0ce50150296559ed07f9af198b
Change-Id: I057b60f40ec63a0ce50150296559ed07f9af198b
parent a2797471
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