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

re-consider ChangeWithSnapshot (at least for plugin api) #99

Open
samuelstroschein opened this issue Oct 16, 2024 — with Linear · 1 comment
Open

re-consider ChangeWithSnapshot (at least for plugin api) #99

samuelstroschein opened this issue Oct 16, 2024 — with Linear · 1 comment

Comments

Copy link
Member

Context

We introduced ChangeWithSnapshot to ease migration during the LIXDK-166. However, the substantial performance benefit of separating the snapshot table is mostly voided if the snapshot is provided in most places.

Example plugin.detectConflicts

Lix queries leaf changes with their snapshots even though it's unclear if a plugin needs the snapshot. Yes, chances are high that a plugin needs the snapshot. But, does it need every snapshot? We don't know.

By naively providing every change with a snapshot, lazily querying snapshots on demand is out of question.

CleanShot 2024-10-16 at 14.15.06@2x.png

Proposal

  1. Consider only exposing changes to plugins. Plugin can query the snapshot as needed.
  2. Find more places where ChangeWithSnapshot is used where it might not be needed.
Copy link
Member Author

Yep, remove change with snapshot.

The csv plugin takes the changes with snapshots and then calls getLeafChange in plugin.applyChanges(). The result is that the snapshot is queried twice.

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

No branches or pull requests

1 participant