bloop icon indicating copy to clipboard operation
bloop copied to clipboard

Temp directory not being deleted for noop projects. Causing slowdown on windows.

Open crt-31 opened this issue 6 months ago • 0 comments

For already compiled projects (that end up as noop), the bloopxxxx directory put in Temp directory is not being deleted.

On large projects, this can create a LOT of directories in the Temp dir, which can start slowing down the system (on Windows) after many months of compiles.

Even better, bloop wouldn't create the temp bloopxxx unless its actually needed, since it is only needed in some circumstances. And even better, bloop could put all its bloopxxx temp folders under a single intermediate temp folder, i.e. %TEMP%/bloop... that way we would be able to delete them all easier if we needed to.

Analysis: See this code, the backgroundTasksWhenNewSuccessfulAnalysis is only added in the isNoop==false. https://github.com/scalacenter/bloop/blob/4425b120a46ef0a97cda7f8ae8a8511a17742b36/backend/src/main/scala/bloop/Compiler.scala#L435

#2056 is similar but didn't handle noop

Note: This is on Windows

crt-31 avatar Aug 29 '24 19:08 crt-31