Add NoEncryption mode and buffered WAL for 9% write performance improvement#7
Merged
MPCoreDeveloper merged 8 commits intomasterfrom Dec 5, 2025
Merged
Conversation
Co-authored-by: MPCoreDeveloper <37024522+MPCoreDeveloper@users.noreply.github.com>
- Add NoEncryptMode support to Storage class - Update Database and DatabaseFactory to accept DatabaseConfig - Add comprehensive xUnit tests for NoEncryption mode - All tests pass (83 total) Co-authored-by: MPCoreDeveloper <37024522+MPCoreDeveloper@users.noreply.github.com>
- Add NoEncryptionBenchmarks for BenchmarkDotNet - Add NoEncryptionPerformanceTest for quick validation - Update Program.cs to support different benchmark modes - Demonstrate 1.05x (4.9%) speedup with NoEncryption - Next: Buffered WAL will provide additional speedup Co-authored-by: MPCoreDeveloper <37024522+MPCoreDeveloper@users.noreply.github.com>
- Update WAL.cs to use FileStream with configurable buffer size - Implement batched writes (flush every 100 operations) - Add FlushAsync method for async flushing - Pass DatabaseConfig to WAL for buffer configuration - Add comprehensive BufferedWalTests - All tests pass (88 total) - Combined speedup: 1.09x (8.5% improvement) with NoEncrypt + Buffered WAL Co-authored-by: MPCoreDeveloper <37024522+MPCoreDeveloper@users.noreply.github.com>
- Add Bogus and LiteDB packages for realistic data generation - Create ComprehensiveBenchmark for BenchmarkDotNet - Create ComprehensivePerformanceTest for quick comparison - Update Program.cs to support comprehensive benchmarks - Note: Comprehensive test needs SQL parser fixes for column-name INSERT - Current performance: ~1.09x speedup with NoEncrypt + Buffered WAL Co-authored-by: MPCoreDeveloper <37024522+MPCoreDeveloper@users.noreply.github.com>
- Add comprehensive performance comparison table - Document NoEncryption mode and Buffered WAL improvements - Show configuration examples for different scenarios - Update benchmark running instructions - All 88 tests pass Co-authored-by: MPCoreDeveloper <37024522+MPCoreDeveloper@users.noreply.github.com>
- Add FlushAsync to IWAL interface for API consistency - Fix Dispose to use Dispose() instead of Close() for proper cleanup - Make QueryCache thread-safe with Interlocked operations on AccessCount - Add internal IncrementAccessCount method to CachedQuery - All 88 tests pass Co-authored-by: MPCoreDeveloper <37024522+MPCoreDeveloper@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add NoEncryption mode for benchmarks
Add NoEncryption mode and buffered WAL for 9% write performance improvement
Dec 5, 2025
MPCoreDeveloper
approved these changes
Dec 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements configurable encryption bypass and buffered WAL I/O to improve write throughput for benchmarking and trusted environment deployments.
Changes
NoEncryption Mode
DatabaseConfig.NoEncryptModebypasses AES-256-GCM inStorageclass (~5% improvement)DatabaseConfig.HighPerformancepreset combines NoEncryption + 2MB WAL bufferBuffered WAL I/O
WALusesFileStreamwith configurable buffer (default 1MB) instead of immediate flushFlushAsync()toIWALinterface for async flush supportBenchmarks
NoEncryptionBenchmarksandComprehensiveBenchmarksuitesUsage
Performance
Testing
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.