refactor(ai): Parallelize primary group processing #57

Merged
eleith merged 1 commits from gemini/feature/parallel-ai-processing into main 2025-09-05 20:15:02 +00:00
1 Commits
Author SHA1 Message Date
eleith 1a3e9ec881 refactor(ai): Parallelize primary group processing
This commit introduces concurrency to the AI digest generation to improve performance.

The `BuildDigestDataByAI` function now processes each primary group in a separate goroutine.
A `sync.WaitGroup` is used to wait for all goroutines to complete.
A `sync.Mutex` is used to protect concurrent access to the results slice.
The final slice of primary groups is sorted alphabetically to ensure deterministic output for testing.
2025-09-05 13:11:26 -07:00