Files
shopdb-flask/plugins/endpoints/plugin.py
Proudlock 1ed0c4d215 HOTFIX: Remove hot-path logging and unnecessary flush from collector
Removed performance bottlenecks in _replace_applications():
- 5 logger.info/warning calls executing on every collector check-in
- Explicit db.session.flush() in legacy path forcing immediate SQL
- With 800 check-ins/hour, this was 800 log writes + 800 premature flushes

Changes:
- Removed all hot-path logging (moved critical info to warnings list)
- Removed flush() in legacy fallback path (let transaction commit batch SQL)
- Kept conditional flush in delta mode (only when changes detected)

Impact: Eliminates 800+ disk I/O operations per hour in collector path

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-09-15 10:29:10 -04:00

73 KiB