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