Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(store): optimize chunker cloning in stores fixing stack overflow #129

Conversation

appcypher
Copy link
Owner

Fix stack overflow in test_ops_rename by wrapping chunkers and layouts in Arc to avoid expensive cloning in MemoryStore and FlatFsStore. This significantly improves performance for deep recursive operations.

Key changes:

  • Fix potential stack overflow in directory rename operations
  • Wrap chunkers and layouts in Arc in MemoryStore and FlatFsStore
  • Update FastCDC and GearCDC to use Arc for gear tables
  • Add directory tree visualization utility as a bonus feature

The performance improvement is particularly noticeable in deep recursive operations like directory renames, where multiple store clones were previously occurring.

Fix stack overflow in test_ops_rename by wrapping chunkers and layouts in Arc to avoid
expensive cloning in MemoryStore and FlatFsStore. This significantly improves performance
for deep recursive operations.

Key changes:
- Fix potential stack overflow in directory rename operations
- Wrap chunkers and layouts in Arc in MemoryStore and FlatFsStore
- Update FastCDC and GearCDC to use Arc for gear tables
- Add directory tree visualization utility as a bonus feature

The performance improvement is particularly noticeable in deep recursive operations
like directory renames, where multiple store clones were previously occurring.
@appcypher appcypher merged commit 605fe08 into appcypher/optional-refcounting-flatfsstore Feb 6, 2025
@appcypher appcypher deleted the appcypher/fix-chunker-stackoverflow branch February 6, 2025 13:53
appcypher added a commit that referenced this pull request Feb 6, 2025
…moryStore APIs (#128)

* refactor(store): improve FlatFsStore and MemoryStore APIs

- Make reference counting optional in FlatFsStore
- Add TypedBuilder for better store configuration
- Rename FlatFsStoreDefault to FlatFsStore
- Improve documentation for both stores
- Remove LRU dependency
- Simplify store constructors by using builder pattern
- Add tests for disabled reference counting

* perf(store): optimize chunker cloning in stores fixing stack overflow (#129)

Fix stack overflow in test_ops_rename by wrapping chunkers and layouts in Arc to avoid
expensive cloning in MemoryStore and FlatFsStore. This significantly improves performance
for deep recursive operations.

Key changes:
- Fix potential stack overflow in directory rename operations
- Wrap chunkers and layouts in Arc in MemoryStore and FlatFsStore
- Update FastCDC and GearCDC to use Arc for gear tables
- Add directory tree visualization utility as a bonus feature

The performance improvement is particularly noticeable in deep recursive operations
like directory renames, where multiple store clones were previously occurring.

* test: improve test documentation and isolation

- Add mutex to synchronize stdout redirection in tests
- Add ignore attributes to directory tree tests that use stdout
- Fix example code in print_dir_tree documentation
- Add documentation for monofs directory tree tests explaining stdout issues
- Add descriptive reasons for ignored Docker registry tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant