Closed
Description
Component
API Server / GraphQL
Infrahub version
1.13.1
Current Behavior
if a branch has many deletes (over 1,000 nodes), generating the diff takes progressively longer as each batch of nodes is processed
Expected Behavior
the performance for a branch with many deletes should be similar to a branch with many new or updated nodes
Steps to Reproduce
- add many nodes
- make a branch
- delete many nodes on this branch
- generate a diff
- you will see entries in the task-worker or server log that look like this
2025-06-27 09:15:30 Beginning diff node-level calculation queries for branch
2025-06-27 09:15:30 Beginning one diff calculation query limit=500, offset=0
2025-06-27 09:15:37 Diff calculation query complete limit=500, offset=0
2025-06-27 09:16:00 Beginning one diff calculation query limit=500, offset=500
2025-06-27 09:16:04 Diff calculation query complete limit=500, offset=500
2025-06-27 09:17:13 Beginning one diff calculation query limit=500, offset=1000
2025-06-27 09:17:17 Diff calculation query complete limit=500, offset=1000
2025-06-27 09:20:42 Beginning one diff calculation query limit=500, offset=1500
2025-06-27 09:20:50 Diff calculation query complete limit=500, offset=1500
2025-06-27 09:24:41 Beginning one diff calculation query limit=500, offset=2000
2025-06-27 09:24:42 Diff calculation query complete limit=500, offset=2000
2025-06-27 09:26:01 Diff node-level calculation queries for branch complete
notice the increasing time between Diff calculation query complete
and the next Beginning one diff calculation query
Additional Information
No response