[WIP] test restructure for improving sync_local performance#179
Draft
[WIP] test restructure for improving sync_local performance#179
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See details here: #178
This is an AI-assisted implementation of part 1 of the proposal. This is not a fully stable implementation yet - it's just enough to do some performance testing. In particular:
powersync_trigger_resync()isn't updated yet.ps_oplog_opidindex isn't removed yet (it does not affect these performance tests).Performance
For some background on the performance tests and previous optimizations, see #78.
Running the performance tests in
dart/test/sync_local_performance_test.dart, before these changes:After:
Test notes:
ps_updated_rowsduring the initial download.Note the increased writes on the
sync_local (partial)case - I assume this is since we now delete data fromps_updated_rowsthat we did not delete in that case before.We can also compare the individual read queries directly, excluding the "write data" bits:
Interesting notes here:
ps_updated_rows, and uses more reads operations in this case. This is likely due to the test treating the first 10k/500k operations as "already applied".