Skip to content

Latest commit

 

History

History
71 lines (56 loc) · 1.8 KB

File metadata and controls

71 lines (56 loc) · 1.8 KB

Performance Testing

Test Environment

  • Platform: Linux
  • Clojure: 1.8.0
  • Datomic: Free 0.9.5344
  • JGit: 4.1.1

Muramasa Repository (Self-Test)

  • Repository Size: 21 commits, 125 objects total
  • Fresh Sync: ~2-3 seconds
  • Incremental Sync: <1 second (0 objects synced)

Performance Characteristics

Fresh Sync

  • Time complexity: O(n) where n = total git objects
  • Memory: Objects held in memory during transaction
  • Bottleneck: JGit parsing and Datomic transaction

Incremental Sync

  • Time complexity: O(m) where m = new objects only
  • Memory: Minimal - only new objects loaded
  • Bottleneck: SHA existence checks in database

Optimization Opportunities

Current Implementation

  • ✅ Incremental sync (only new objects)
  • ✅ Lazy parsing (objects parsed on-demand)
  • ✅ Parse memoization (via seen set)
  • ❌ Batch transactions (temporarily disabled)
  • ❌ Parallel parsing

Known Limitations

  • Single transaction for all objects (no batching currently)
  • Tree/parent references disabled (reduces transaction size)
  • Blobs use placeholder URIs (not persisted to disk)

Recommendations

Small Repos (< 1000 commits)

  • Current implementation works well
  • No optimization needed

Medium Repos (1000-10000 commits)

  • Re-enable batch transactions
  • Consider parallel object parsing
  • Implement blob disk persistence

Large Repos (> 10000 commits)

  • Implement chunked syncing
  • Add progress callbacks
  • Consider stream processing
  • Database query optimization for SHA checks

Test Results

Muramasa (21 commits)

Collecting commits: ~100ms
Collecting objects: ~500ms
Preparing transaction: ~50ms
Transacting: ~1-2s
Total: ~2-3s

Notes

  • Transaction time dominates for small repos
  • Parsing time increases linearly with object count
  • Incremental sync is very fast (< 1s)