Skip to content

Conversation

@jelmer
Copy link
Owner

@jelmer jelmer commented Jul 16, 2025

No description provided.

jelmer added 7 commits July 25, 2025 17:22
Implements the TODO for multi-threading in pack deltification with three
separate implementations and automatic thread count optimization.

- Support three deltification strategies: no-deltas, single-threaded, multi-threaded
- Adaptive thread count based on object count (1-8 threads)
- Configurable threading parameters (num_threads, batch_size)
Implement a high-performance Rust version of the create_delta function
that provides significant performance improvements for pack deltification.
Implement support for additional Git pack configuration options:

- pack.allowPackReuse: Controls whether existing pack data can be
  reused when generating new packs (defaults to true)
- Implement deltify_pack_objects in Rust with single-threaded approach
- Fix create_delta to use minimum match length of 3 bytes
- Use Python's UnpackedObject class for compatibility
- Enable Rust implementation as default for deltify_pack_objects
- All pack tests now pass
Implement parallel delta compression using Rayon with intelligent
thresholding and selective parallelization for optimal performance.

Hide behind a (default enabled) "parallel" feature flag.
- Add C Git's sorting heuristics with name hashing for better delta grouping
- Implement memory-aware delta window management (256MB limit)
- Add delta chain depth limiting (max depth 50, matching Git's default)

These optimizations improve pack performance by:
1. Grouping similar files together for better delta compression
2. Dynamically adjusting window size based on object sizes and memory
3. Preventing excessively deep delta chains that hurt access performance
@jelmer jelmer force-pushed the create-pack-delta-perf branch 2 times, most recently from 2763277 to 1abb07f Compare July 25, 2025 16:23
Added memory pool for buffer reuse during delta creation:
- MemoryPool struct with buffer management
- Buffer reuse for delta operations to reduce allocation overhead
- Capacity limits to prevent memory bloat (64KB max delta, 32KB temp)
@jelmer jelmer force-pushed the create-pack-delta-perf branch from 1abb07f to fbb7da2 Compare July 25, 2025 16:36
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.

2 participants