Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 6.10.20 GetAllObjects function is extremely slow #587

Open
EmilAlipiev opened this issue Jun 28, 2020 · 12 comments · Fixed by #609
Open

[BUG] 6.10.20 GetAllObjects function is extremely slow #587

EmilAlipiev opened this issue Jun 28, 2020 · 12 comments · Fixed by #609
Labels

Comments

@EmilAlipiev
Copy link

EmilAlipiev commented Jun 28, 2020

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.
#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:

ListViewXamarin.zip

@open-collective-bot
Copy link

open-collective-bot bot commented Jun 28, 2020

Hey @EmilAlipiev 👋,

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 priority support for all financial contributors. Don't forget to add priority label once you start contributing 😄

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

@leemallon
Copy link

+1 - Been having the same issue

@EmilAlipiev
Copy link
Author

@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.

@glennawatson
Copy link
Contributor

Repro would definitely help out a lot with getting this one fixed sooner.

@EmilAlipiev
Copy link
Author

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

image

300 simple json object - save, read, deleteall

latest version
image

6.0.31
image

600 nested complex json object - save, read, deleteall

latest version
image
6.0.31
image

300 nested complex json object - save, read, deleteall

latest
image

6.0.31
image

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

As you can the more number increases, complex objects are slower

@glennawatson
Copy link
Contributor

Any chance for the source

@EmilAlipiev
Copy link
Author

EmilAlipiev commented Aug 3, 2020

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.

@EmilAlipiev
Copy link
Author

@glennawatson FYI, above source code has 6.0.31 as last i tested with it.

@EmilAlipiev
Copy link
Author

I have just tested 7.2.1 and problem still persists. it is still very slow.

@glennawatson glennawatson reopened this Feb 3, 2021
@EmilAlipiev
Copy link
Author

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 :)

@EmilAlipiev
Copy link
Author

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

@EmilAlipiev
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants