* 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
()
| 2889 | * pool's idle delay is up. |
| 2890 | */ |
| 2891 | releaseIdleMemory(): void { |
| 2892 | this.trimProjects(1); |
| 2893 | for (const cg of [this.cg, ...this.projectCache.values()]) { |
| 2894 | try { |
| 2895 | cg?.releaseMemory(); |
| 2896 | } catch { /* one that can't let go still answers, and the others still can */ } |
| 2897 | } |
| 2898 | } |
| 2899 | |
| 2900 | /** |
| 2901 | * Close all cached project connections |
no test coverage detected