{"version":"2.0.63","anchor":"slow-operation-detection","canonical_anchor":"slow-operation-detection","heading":"Slow Operation Detection","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.0.63\/e\/slow-operation-detection","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.0.63","markdown":"### Slow Operation Detection\n\n**What:** New performance monitoring that detects and logs slow filesystem and shell command operations.\n\n**How it works:**\n\n- All synchronous filesystem operations (20 in total) are now wrapped with timing instrumentation\n- Shell command executions via `execSyncWithDefaults` are similarly monitored\n- Operations exceeding 5ms are logged to debug output with the operation name and duration\n\n**Details:**\n\n- Log format: `[SLOW OPERATION DETECTED] fs.readFileSync (12.3ms)` or `[SLOW OPERATION DETECTED] execSyncWithDefaults (156.7ms): git status...`\n- Monitored fs operations include: `existsSync`, `statSync`, `readFileSync`, `writeFileSync`, `appendFileSync`, `copyFileSync`, `unlinkSync`, `renameSync`, `readdirSync`, `mkdirSync`, `rmdirSync`, `rmSync`, and others\n- For shell commands, the first 100 characters of the command are included in the log\n- Logs are written to debug output (controlled by `CLAUDE_CODE_DEBUG_LOGS_DIR` environment variable)\n- **Evidence:** `XX()` wrapper function at line 554, threshold `Zl2 = 5` at line 605, shell monitoring in `MG()` at line 16934"}