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

db: use triggers and change table for reactivity on native #4279

Merged
merged 9 commits into from
Jan 9, 2025

Conversation

patosullivan
Copy link
Member

Fixes reactivity issue we were seeing on both platforms by:

  1. fixing an issue with a field name in triggers
  2. using the triggers and change table/polling method on native to get around the issues we found with op-sqlite's updateHook.

This also creates a new BaseDb class where shared code for both platforms can live.

I tested this out in the sim on native and watched the CPU usage in xcode, didn't notice any difference over the current baseline (which I found to be pretty bad on initial channel load, fwiw).

fixes tlon-3317

Copy link

linear bot commented Dec 12, 2024

Copy link
Member

@latter-bolden latter-bolden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try it out!

@jamesacklin
Copy link
Member

Fire at will

@patosullivan patosullivan merged commit 9036269 into develop Jan 9, 2025
1 check passed
@patosullivan patosullivan deleted the po/use-triggers-and-change-table-on-mobile branch January 9, 2025 16:04
latter-bolden added a commit that referenced this pull request Jan 10, 2025
Revert "db: use triggers and change table for reactivity on native (#4279)"
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.

3 participants