TintBrowser
TintBrowser copied to clipboard
Performance improvement suggestion
Dear developers,
I am a big fan of TintBrowser, and recently I am writing a static code analysis tool to conduct performance analysis for Android apps. I found several violations of "resource leakage" patterns in TintBrowser's code. These violations could affect the performance of your app. Here is a representative one.
In org.tint.providers package, the method public static void deleteFolder(ContentResolver contentResolver, long id) invokes "acquireContentProviderClient" to acquire a content provider client. However, according to the suggestion of anroid developer, the caller must indicate that they are done with the provider by calling release() which will allow the system to release the provider it it determines that there is no other reason for keeping it active. Unfortunately, this principle is not correctly applied in this method.
So I am curious :) Looking forward to your response. Thanks.
References: resource leakage pattern: http://developer.android.com/reference/android/content/ContentResolver.html#acquireContentProviderClient(android.net.Uri)