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

Optimistic updates improvements #1733

Merged
merged 11 commits into from
Jun 1, 2023
Merged

Conversation

dfahlander
Copy link
Collaborator

No description provided.

* Autoincremented large bulkPut/bulkAdd could be optimized by not scanning for null keys.
* Autoincremented bulkAdd/bulkPut (fewer than 50 adds/puts) could react faster if keys are provided.
- a higher level middleware stack.
First addition is the "update" mutation.
We will want to put advanced queris into the query method with:
* offset
* reverse?
* orderBy
* Instead of index+range, have a criteria object with object syntax to represent all kinds of queries
...now that cache middleware comes before virtualindexmiddleware
...if db.open() was fired as a pseudo-operation in background when a liveQuery is executed the first time.

This resulted in that on-ready callbacks execute in the liveQuery context and get exception for doing a 'rw' transaction within the live query if the on-ready callback does some write transaction.

Solution is to always make sure that db.open() executes on the top scope no matter the scope of the caller.
@dfahlander dfahlander merged commit 14d9c58 into master Jun 1, 2023
1 check failed
@dfahlander dfahlander deleted the optimistic-updates-improvements branch June 1, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant