Skip to content

perf(cmdb): optimize CI cache initialization with batch queries#775

Open
lovvvve wants to merge 1 commit intoveops:masterfrom
lovvvve:master
Open

perf(cmdb): optimize CI cache initialization with batch queries#775
lovvvve wants to merge 1 commit intoveops:masterfrom
lovvvve:master

Conversation

@lovvvve
Copy link
Copy Markdown
Contributor

@lovvvve lovvvve commented Apr 17, 2026

  • Add _build_ci_dicts_batch() helper function to batch-load CI attributes by value table, reducing N*M queries to T queries
  • Optimize CI relation loading by pre-fetching ci_id -> type_id mapping to eliminate N+1 query pattern
  • Refactor cache building to group CIs by type and process in batches of 500 for better memory efficiency
  • Add progress tracking and error reporting with detailed logging at each stage
  • Skip already-cached CIs before batch processing to avoid redundant operations
  • Add aidlc-docs to .gitignore
  • Improves cache initialization performance for large CI datasets by reducing database round-trips

- Add _build_ci_dicts_batch() helper function to batch-load CI attributes by value table, reducing N*M queries to T queries
- Optimize CI relation loading by pre-fetching ci_id -> type_id mapping to eliminate N+1 query pattern
- Refactor cache building to group CIs by type and process in batches of 500 for better memory efficiency
- Add progress tracking and error reporting with detailed logging at each stage
- Skip already-cached CIs before batch processing to avoid redundant operations
- Add aidlc-docs to .gitignore
- Improves cache initialization performance for large CI datasets by reducing database round-trips
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