perf: Optimize LOCAL mode AI enhancement with parallel execution
- Increase default batch size from 5 to 20 patterns per CLI call - Add parallel execution with 3 concurrent workers (configurable) - Add ai_enhancement settings to config_manager: - local_batch_size: patterns per Claude CLI call (default: 20) - local_parallel_workers: concurrent CLI calls (default: 3) - Expected speedup: 6-12x faster for large codebases Config settings can be changed via: skill-seekers config (coming soon) or editing ~/.config/skill-seekers/config.json Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,10 @@ class ConfigManager:
|
||||
},
|
||||
"resume": {"auto_save_interval_seconds": 60, "keep_progress_days": 7},
|
||||
"api_keys": {"anthropic": None, "google": None, "openai": None},
|
||||
"ai_enhancement": {
|
||||
"local_batch_size": 20, # Patterns per Claude CLI call (default was 5)
|
||||
"local_parallel_workers": 3, # Concurrent Claude CLI calls
|
||||
},
|
||||
"first_run": {"completed": False, "version": "2.7.0"},
|
||||
}
|
||||
|
||||
@@ -378,6 +382,30 @@ class ConfigManager:
|
||||
if deleted_count > 0:
|
||||
print(f"🧹 Cleaned up {deleted_count} old progress file(s)")
|
||||
|
||||
# AI Enhancement Settings
|
||||
|
||||
def get_local_batch_size(self) -> int:
|
||||
"""Get batch size for LOCAL mode AI enhancement."""
|
||||
return self.config.get("ai_enhancement", {}).get("local_batch_size", 20)
|
||||
|
||||
def set_local_batch_size(self, size: int):
|
||||
"""Set batch size for LOCAL mode AI enhancement."""
|
||||
if "ai_enhancement" not in self.config:
|
||||
self.config["ai_enhancement"] = {}
|
||||
self.config["ai_enhancement"]["local_batch_size"] = size
|
||||
self.save_config()
|
||||
|
||||
def get_local_parallel_workers(self) -> int:
|
||||
"""Get number of parallel workers for LOCAL mode AI enhancement."""
|
||||
return self.config.get("ai_enhancement", {}).get("local_parallel_workers", 3)
|
||||
|
||||
def set_local_parallel_workers(self, workers: int):
|
||||
"""Set number of parallel workers for LOCAL mode AI enhancement."""
|
||||
if "ai_enhancement" not in self.config:
|
||||
self.config["ai_enhancement"] = {}
|
||||
self.config["ai_enhancement"]["local_parallel_workers"] = workers
|
||||
self.save_config()
|
||||
|
||||
# First Run Experience
|
||||
|
||||
def is_first_run(self) -> bool:
|
||||
@@ -443,6 +471,11 @@ class ConfigManager:
|
||||
print(f" • Auto-switch profiles: {self.config['rate_limit']['auto_switch_profiles']}")
|
||||
print(f" • Keep progress for: {self.config['resume']['keep_progress_days']} days")
|
||||
|
||||
# AI Enhancement settings
|
||||
print("\nAI Enhancement (LOCAL mode):")
|
||||
print(f" • Batch size: {self.get_local_batch_size()} patterns per call")
|
||||
print(f" • Parallel workers: {self.get_local_parallel_workers()} concurrent calls")
|
||||
|
||||
# Resumable jobs
|
||||
jobs = self.list_resumable_jobs()
|
||||
if jobs:
|
||||
|
||||
Reference in New Issue
Block a user