-
Notifications
You must be signed in to change notification settings - Fork 42
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: stoolap/stoolap
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: stoolap/stoolap
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.2.3
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 5 commits
- 76 files changed
- 1 contributor
Commits on Jan 13, 2026
-
feat: add background cleanup and memory management improvements
- Add background cleanup thread for periodic garbage collection - Configurable via CleanupConfig (interval, retention periods) - Cleans deleted rows, old transactions, and previous versions - Auto-starts on Database::open(), stops on close() - Implement arena slot reuse to prevent unbounded memory growth - Free list tracks cleared slots for reuse on insert - Batch clearing via clear_batch() for efficient cleanup - Add Index trait _into methods to avoid allocations - get_row_ids_equal_into, get_row_ids_in_range_into, get_row_ids_in_into - Callers can reuse Vec buffers across multiple calls - Convert rows to Arc storage immediately in TransactionVersionStore::put() - Enables efficient Arc cloning during commit - Add rollback_all_tables() to clean up txn_version_stores on rollback - Prevents memory leaks when transactions are rolled back - Fix Database::Drop to only remove from registry when last reference - Uses Arc::ptr_eq and strong_count check to avoid breaking clones
Configuration menu - View commit details
-
Copy full SHA for ce9cd82 - Browse repository at this point
Copy the full SHA ce9cd82View commit details
Commits on Jan 14, 2026
-
perf: O(1) COUNT(*) and COUNT(DISTINCT) fast paths with memory optimi…
…zations - Add committed_row_count atomic counter to VersionStore for O(1) COUNT(*) - Updated add_version, add_version_single, add_versions_batch to track counter - +1 for INSERT, -1 for DELETE, handles state transitions correctly - Add get_distinct_count_excluding_null() to Index trait for O(1) COUNT(DISTINCT) - Implemented in BTreeIndex and HashIndex - Avoids cloning all values just to count them - Add compiled query cache for COUNT(*) and COUNT(DISTINCT) queries - CompiledCountStar and CompiledCountDistinct in query_cache.rs - Schema epoch validation for cache invalidation - Properly handles FILTER clause (bypasses fast path) - Introduce RowIdVec pooled vector for index lookups - Thread-local buffer pooling with best-fit allocation - 256K max cached capacity to prevent unbounded memory - Fixed broken IntoIter Drop that couldn't recover buffer - BTree index optimization: use Borrow trait for lookups - No allocation needed for equality checks - Only create CompactArc for range operations - Clean up dead code in try_index_lookup OR expression handling Performance: COUNT(*) ~22.5µs → ~2.9µs (7.7x faster)
Configuration menu - View commit details
-
Copy full SHA for 9124c7b - Browse repository at this point
Copy the full SHA 9124c7bView commit details -
perf: add cleanup for global pools and LRU caches
- Add clear_version_map_pools() for TransactionVersions pools - Add clear_program_cache() for expression bytecode LRU cache - Add clear_classification_cache() for query classification LRU cache - Call all cleanup functions from clear_all_thread_local_caches() Memory at program end: 665 KB → 153.6 KB (77% reduction)
Configuration menu - View commit details
-
Copy full SHA for 8701d9e - Browse repository at this point
Copy the full SHA 8701d9eView commit details
Commits on Jan 17, 2026
-
perf: introduce SmartString, I64Map, and value interning for memory e…
…fficiency (#10) Major optimizations: **SmartString** - Custom SSO string replacing CompactString - Inline storage for strings ≤22 bytes (no heap allocation) - Owned (Box<str>) for computed values, Shared (Arc<str>) for cloned values - 24-byte size with O(1) clone for shared variant **I64Map** - High-performance hashmap for i64 keys - Uses i64::MIN as empty sentinel (row/txn IDs are always ≥0) - FxHash-based with linear probing and backward-shift deletion - ~45% faster lookups than FxHashMap<i64, V> **Value Interning** - Shared instances for common values - Interned: NULL (all 7 DataTypes), booleans, integers 0-1000 - Reduces allocations for frequently used values in rows **Aggregation Fixes & Optimizations** - Fixed hash collision bug in single-column GROUP BY (was using hash as key) - Added 2-column tuple optimization (30% faster than Vec<Value>) - Single-column primitive GROUP BY uses I64Map directly **SIMD Pattern Matching** - memchr::memmem for LIKE '%pattern%' substring search - Pre-compiled Finder stored in CompiledPattern **Other Improvements** - CompactVec: new insert(), retain(), drain() methods - All indexes migrated to I64Map and CompactVec - Thorough SAFETY documentation on unsafe code
Configuration menu - View commit details
-
Copy full SHA for 221606b - Browse repository at this point
Copy the full SHA 221606bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b2a0d0 - Browse repository at this point
Copy the full SHA 9b2a0d0View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.2.2...v0.2.3