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.
Proposal
Consider only exposing changes to plugins. Plugin can query the snapshot as needed.
Find more places where ChangeWithSnapshot is used where it might not be needed.
The csv plugin takes the changes with snapshots and then calls getLeafChange in plugin.applyChanges(). The result is that the snapshot is queried twice.
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.
Proposal