Closed xDragonZ closed 5 years ago
The library doesn't persist its Preferences in a Database but within the SharedPreferences wrapped in a Content Provider. This should give a significant performance boost. I'm not entirely sure this really works across multiple processes though ðŸ’
Regarding the speed issue: This could be solved using a Memory Cache (see the open Issue here.
Getting some high amount of ANR in play console report, not sure is related to Tray or not.
Any plan to provide an option to wrap the sharedprefrence in content provider? Meanwhile i will try dpreference library in production and let you know the result does it works well in multiprocess.
Edit: 1) Oh never mind, just notice you mention that "metadata seemed to be more valuable to us" in readme 2) Tested another library similar to dpreference and it works well (not tested on production yet)
@xDragonZ What library did you test? Have you tested in production yet?
I am also seeing ANRs with traces going deep in to tray (as well as a few other places). They seem to be mostly on put calls
native: pc 000000000005f1fc /system/lib64/libc.so (__ioctl+4) native: pc 00000000000692c0 /system/lib64/libc.so (ioctl+100) native: pc 00000000000275f0 /system/lib64/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+164) native: pc 0000000000028044 /system/lib64/libbinder.so (_ZN7android14IPCThreadState15waitForResponseEPNS_6ParcelEPi+112) native: pc 00000000000282b8 /system/lib64/libbinder.so (_ZN7android14IPCThreadState8transactEijRKNS_6ParcelEPS1_j+176) native: pc 000000000001ff38 /system/lib64/libbinder.so (_ZN7android8BpBinder8transactEjRKNS_6ParcelEPS1_j+64) native: pc 00000000000dc2a0 /system/lib64/libandroid_runtime.so (???) native: pc 00000000012acb80 /data/dalvik-cache/arm64/system@framework@boot.oat (Java_android_os_BinderProxy_transactNative__ILandroid_os_Parcel_2Landroid_os_Parcel_2I+212) at android.os.BinderProxy.transactNative (Native method) at android.os.BinderProxy.transact (Binder.java:496) at android.content.ContentProviderProxy.insert (ContentProviderNative.java:474) at android.content.ContentResolver.insert (ContentResolver.java:1207) at net.grandcentrix.tray.provider.e.a (SourceFile:151) at net.grandcentrix.tray.provider.a.a (SourceFile:260) at net.grandcentrix.tray.provider.a.a (SourceFile:231) at net.grandcentrix.tray.core.c.a (SourceFile:310) at net.grandcentrix.tray.core.c.b (SourceFile:144)
Hi,
I stumble upon another library called DPreference and did a quick test (using latest Tray version). Looks like Tray performance is not that good compare to DPreference, maybe due to DPreference is a simple library. Anyway hopefully will see some improvement for Tray in future.