3 ms·
> because Defender WILL scan each and every file of your 65535 dependencies and it WILL NOT use more than a single core it seems. Does yarn use more than a sin
by toast0 5y ago
> because Defender WILL scan each and every file of your 65535 dependencies and it WILL NOT use more than a single core it seems.
Does yarn use more than a single core? I've seen some analysis articles that a major root cause of the slowdowns here are that the scanning API is hooked into file close and scanning takes time, so if you have a straightforward open file, write to file, close file, repeat single threaded process, your throughput gets really limited. I don't think there's a Windows API for asynchronous close, but if you send the handle to a thread (pool?), that will get you much better results.
- jeroenhd 5y agoI wouldn't know, to be honest. It's not just a yarn problem, though. Anything operating on lots of tiny files (from IDEs to git to setup executables) gets bogged down to Windows Defender in strange ways. None of the resources in task manager (or the resource manager thing) will show anything being capped so it's hard to troubleshoot what system Defender stresses so much.
- toast0 5y ago> None of the resources in task manager (or the resource manager thing) will show anything being capped so it's hard to troubleshoot what system Defender stresses so much. Yeah, task manger is missing the most useful feature of FreeBSD top, the state column that lets you know what the process was doing at the sample time. If you saw your installer was always in state close handle, you'd have a good guess. But it's a straight forward throughput problem; if it takes 1 ms to scan a file, and there's no concurrency or pipelining, then you're limited to 1000 files per second. If you can thread pool closing, you get a lot more throughput. Unfortunately, everything that runs on windows and expects to close lots of files needs to manage a threadpool to close, but usually developers don't get to pick their platform, their users pick.