-
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
optimizationPerformance and optimization tasksPerformance and optimization tasks
Description
Purpose
PostToolUse hook이 모든 tool 호출마다 3회 I/O (DB open/write/close + stats update + notification check) 수행. 빈번한 tool 호출 시 지연 발생 가능.
Changes
packages/claude-code-plugin/hooks/post-tool-use.py— lazy initialization, connection reusepackages/claude-code-plugin/hooks/lib/history_db.py— singleton 패턴 또는 connection poolpackages/claude-code-plugin/hooks/lib/stats.py— batch write 또는 in-memory accumulation
Acceptance Criteria
- DB connection을 세션당 1회 open, 재사용 (singleton)
- Stats를 in-memory에 축적, 주기적 flush (N회마다 또는 Stop 시)
- Notification check를 conditional로 변경 (설정 비활성화 시 skip)
- 벤치마크: 기존 대비 hook 실행 시간 50%+ 감소
- 기존 테스트 모두 통과
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
optimizationPerformance and optimization tasksPerformance and optimization tasks