-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Evaluate performance of PouchDB indexeddb adapter #9208
Comments
@ralfudx, we will likely run the automation Apdex tests to compare it with our previous numbers. cc: @michaelkohn |
Yeah this is noted |
I am assigning this to me as I want to run the Apdex Automation now that we get consistent results, and compare before and after. First trying with ugly code |
Apdex scoreThis test suite focuses on queries during navigation and searching by free text. The biggest performance improvements are:
No slowdowns were detected. Telemetry filesPouchDB 9 integrationThe During the integration, I encounter these errors:
After I fixed the telemetry, the 2 first stopped appearing. Other helpful Apdex suitesThese are other test suites that can be done for this work, but we need to configure the suite for the
|
70% is almost too good to believe. Are you confident in this number? Is it possible some of the other changes you made to this branch are causing it? Is there any other explanation you can think of that might explain this?
The easiest way I can think of is to have new users use the new adapter and existing users continue to use the old adapter. I like this because...
There is a complexity cost to this but the way PouchDB is architected it's not a big cost. |
I've added this to this week's tasks; I'll dig more into tasks and rules engine |
The e2e for tasks is working. I debugged tasks, and they are creating and resolving as expected. I can see the local docs about tasks being updated (screenshots below) and changing the status accordingly. There are no errors in the browser's console. So far, I haven't detected weird behaviors. I opened this PR to visualize the changes better: #9296. This PR is not for merging, it's intended to be a playground for testing. Changes:
And that's it, the rest is the same. |
I ran tests (3 times) using an offline CHW and an offline Supervisor in 2 instances, one for the baseline and the other for the PouchDB Adapter v9. Both instances have the same configuration and data (I used the test-data-generator for this).
Baseline
Storage
The "User Data" varies depending on whether meta and docs were cleaned when opening the app. Memory (MB)
CPU (%)
PouchDB Adapter v9
Storage
The "User Data" varies depending on whether meta and docs were cleaned when opening the app. Memory (MB)
CPU (%)
|
@latin-panda If I may be so bold as to summarise your findings...
Is that an accurate summary? |
@garethbowen, that's correct based on my test results, which focus on queries to the DB. |
@dianabarsan you mentioned in a different issue:
Could we capture here what you think is missing before we can ship this issue? |
@jkuester So to benefit of the new adapter, users would need to clear cache and reinstall. This interferes with your idea of matching the two updates, because:
|
Describe the performance issue
PouchDB 9.0 has just been released with significant improvements to the
indexeddb
adapter which should make it perform better than theidb
adapter we currently use.Describe the improvement you'd like
Upgrade to Pouch 9.0 and run a suite of client side performance tests with representative data on the old adapter and the new adapter and publish the results. There is currently no migration from one to the other so you will have to completely reset the browser data when you switch adapter.
Measurements
Additional context
Once we've determined if and how much this improves performance we can decide which of several options to take next (in a separate issue):
indexeddb
adapter for new clients, but keep theidb
adapter around for existing clients. I like this option because it's not a breaking change, and allows for progressive rollout. This could also be used as a workaround for heavy users to do a sync, wipe, initial replication to get the improved performance.idb
adapter. This is difficult because we have to be careful about not exhausting disk space during the migration, and may take a while to execute which would block CHWs from doing work until it's finished. For this reason it's probably a breaking change and would be delayed until the next major release.The text was updated successfully, but these errors were encountered: