* A query worker kept through a quiet spell gives back what it can without * going cold: every project but the last one used closes, and what stays * open lets go of the memory it holds only to read faster. The heap needs * nothing from here: V8 shrinks an idle thread's by itself, well befo
()
| 2730 | * pool's idle delay is up. |
| 2731 | */ |
| 2732 | releaseIdleMemory(): void { |
| 2733 | this.trimProjects(1); |
| 2734 | for (const cg of [this.cg, ...this.projectCache.values()]) { |
| 2735 | try { |
| 2736 | cg?.releaseMemory(); |
| 2737 | } catch { /* one that can't let go still answers, and the others still can */ } |
| 2738 | } |
| 2739 | } |
| 2740 | |
| 2741 | /** |
| 2742 | * Close all cached project connections |
no test coverage detected