Add cached sequence walker/reader implementation - Issue #96 #495
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.
Summary
Implements Issue #96: Cached sequence walker or sequence reader or sequences index
This PR introduces a comprehensive caching system for sequence operations that provides significant performance improvements when reading data from Links storage. The implementation caches the relationship between arrays of subsequence elements and their addresses, allowing for much faster repeated sequence reads.
🚀 Key Features
📦 New Components
SequenceCache<TLinkAddress>ConcurrentDictionarySequenceFileCache<TLinkAddress>CachedSequenceWalker<TLinkAddress>LinksDisposableDecoratorBasefollowing existing patternsUpdateandDeleteoperationsCachedSequenceExtensionsWithSequenceCache(),GetCachedSequenceArray(), etc.ILinksimplementation💡 Usage Examples
🎯 Performance Impact
The link is two subsequences, we can cache the relationship between each array of subsequence's elements and its address. So if need to convert the address to array of elements second time we can do it faster, because of cached arrays. This can have a significant impact on the speed of reading of data from Links storage.
✅ Testing
📋 Version Update
0.18.1→0.19.0(minor version for new feature)🔄 Backwards Compatibility
Test Plan
🤖 Generated with Claude Code
Resolves #96