[BUG] 6.10.20 GetAllObjects function is extremely slow
Describe the bug I have created this bug earlier and came back to see any improvement because my previous issue was closed with a commit but unfortunately result is same or worse.
I am currently on 6.0.31 which is extremely efficient and fast. I have a complex data structure with 3-4 layer parent children. You can think of like School->Class->Teacher->Students i store each under school object. When I try to pull cached school objects with await BlobCache.UserAccount.GetAllObjects<School>();, tested for 300 records, it returns within 2 secs in 6.0.31 but latest version 6.10.20 takes 11 secs.
There must be major breaking change in between those version 6.2.3 had same issue. https://github.com/reactiveui/Akavache/issues/451
Is there any stress test available here? If not later i will try to create a repro or try to debug the source code myself.
Environment
- OS: android 10
- Device: UWP local and Android emulator or device
- Version: 6.10.20
- Working Version: 6.0.31
Repro:
Hey @EmilAlipiev :wave:,
Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.
https://opencollective.com/reactiveui
PS.: We offer
prioritysupport for all financial contributors. Don't forget to addprioritylabel once you start contributing :smile:
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!
+1 - Been having the same issue
@rarelyleemallon do you have sample project? i have to create one but being so busy recently. If you have one, it would help for solution faster i think.
Repro would definitely help out a lot with getting this one fixed sooner.
please find the repro. Steps to follow very simple. see the screenshot. There 2 type of json file in the attached project. Simple and complex(nested objects). Buttons are self explanatory. Enter object count to enter. the more you enter it becomes slower. Below are the some results and comprehension between latest and 6.0.31 versions

300 simple json object - save, read, deleteall
latest version

6.0.31

600 nested complex json object - save, read, deleteall
latest version
6.0.31

300 nested complex json object - save, read, deleteall
latest

6.0.31

600 nested complex json object - save, read, deleteall
latest
6.0.31

As you can the more number increases, complex objects are slower
Any chance for the source
sorry posted too fast. I have updated original question above with the source code. Above screenshots are for UWP and i think android even has bigger difference. Ios i havent tested yet.
@glennawatson FYI, above source code has 6.0.31 as last i tested with it.
I have just tested 7.2.1 and problem still persists. it is still very slow.
Just coming back to this issue. Today tested version 8.1.1 and problem seems to be resolved, at least on Android so far. I will test further to see if it works on all. thanks for the progress :)
unfortunately problem is not solved only working well on Android 12 but I have just tested with another phone with Android 9, it is somehow slow
I have made more tests to understand the behaviour and testing with same data Android 9 device with Akavache 8.1.1 returns 14 secs Android 9 Akavache 6.10.20 returns 4 secs
Android 12 version 8.1.1 returns 4 secs Android 12 Akavache 6.10.20 returns 4 secs
What could be the reason on the old Android version Akavache latest version is extremely slow?