Reduce transactions for acquiring and releasing provider
App may access a provider frequently in a short time. (Without using ContentProviderClient to keep the connection) Then there will have some overhead for the management of provider reference. So with a delay to release the provider, the app can reuse the existing holder within the retain time. Also change removeContentProvider to a one-way method to reduce the time spent on app's main thread. This should be safe because originally the app can acquire provider from any thread. The cold start time of calendar app can be reduced by ~20ms. Test: AppLaunchTest Bug: 123043091 Change-Id: I220cec3deab18b658f4102f7eb9f47599c7c4b7c
Loading
Please register or sign in to comment