Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rewritten
_performSnapshot
function (#300)
Previous implementation executed 3N+2 queries for N oplog entries (`UPDATE` timestamps, `SELECT` updated, then, per oplog entry, `SELECT` shadow row, `UPDATE` oplog entry, `UPDATE` or `DELETE` shadow row). This implementation always executes exactly 4 queries to achieve the same. This lowers the amount of times we're traversing C or WASM boundary and offloads more work to SQLite. This shouldn't affect the performance of current "lightweight" apps, but is likely to show significant improvements over 100+ oplog entries
- Loading branch information
1 parent
b29693e
commit 232f7a5
Showing
14 changed files
with
319 additions
and
258 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"electric-sql": patch | ||
--- | ||
|
||
Updated snapshotting function to be more efficient when handling a large oplog |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.