microsoft / Windows-Dev-Performance

A repo for developers on Windows to file issues that impede their productivity, efficiency, and efficacy
MIT License
438 stars 21 forks source link

A %temp% directory full of node_module garbage slows down the Windows User Profile service on logon #92

Open luchsamapparat opened 3 years ago

luchsamapparat commented 3 years ago

Windows Build Number

Microsoft Windows NT 10.0.19043.0

Processor Architecture

AMD64

Memory

31.8 GB

Storage Type, free / capacity

804 / 952 GB

Relevant apps installed

NodeJS v14.16.1

Traces collected via Feedback Hub

Sorry, but I already spent enough time investigating this issue. See issue description

Isssue description

Some npm package created 547,852 files in my user profile temp directory, amounting to 2.81 GB in total. This caused the Windows login to slow down from a few seconds to several minutes. Investigating the issue revealed, that the user profile service is causing the delay by somehow working through all these files in the temp directory:

image

image

A detailed description of the issues can be found in this bug report: https://github.com/nrwl/nx/issues/5947

Steps to reproduce

this pollutes the temp directory with a lot of folders named tmp-{something}

Expected Behavior

Having a temp directory full of garbage should not slow down the windows login.

Actual Behavior

547,852 files amounting to 2.81 GB in total slows down the login process from seconds to minutes

AvriMSFT commented 2 years ago

Thanks for reporting the issue! This is quite an interesting bug. Good news though- The filesystem and performance teams are investigating issues related to npm. I'll share this issue with the team and update the thread with any news.

AdditionAddict commented 1 year ago

Any news on this?

spyro2000 commented 4 months ago

LOL, one year of silence after the "Good news". MS keeping on doing MS things. Developing on Windows is more and more getting from many minor issues to a real nightmare. I am the only Dev left using Windows in my team and will migrate to Linux/OSX on my next machine, too.