Commit 2f6ef60
committed
Add Batch delta type for efficient bulk updates
Add a new Batch case to the delta type that allows sending multiple
updates at once. This enables more efficient processing during bulk
loading (e.g., when processing CMT files).
Key changes:
- Add Batch of ('k * 'v option) list to delta type
- Add set/remove helper functions for batch entries
- Update all combinators (flatMap, lookup, join, union, fixpoint)
to handle Batch deltas
- Process batch entries, deduplicate affected keys, emit as batch
- Add tests for batch processing
Batch processing uses hashtbl internally for deduplication but
passes batches as lists between combinators. This matches the
existing pattern in combinators and provides O(1) dedup.
Example usage:
emit (Batch [
Reactive.set "a" 1;
Reactive.set "b" 2;
Reactive.remove "c";
])1 parent 0f96d10 commit 2f6ef60
File tree
3 files changed
+446
-65
lines changed- analysis/reactive
- src
- test
3 files changed
+446
-65
lines changed
0 commit comments