My older Windows 10 PC (around 7 years old) has recently been often having a weird issue where shortly after booting, the mouse would become hugely laggy and the PC really unresponsive. It would last maybe 30 minutes or more and then settle down. Looking in Task Manager, TiWorker.exe (Windows Modules Installer Worker) in particular would be very busy but other unrelated processes would seem busier than usual too. I assume the system was completing applying either normal Windows Updates or Defender Definitions Updates.

I tried all the usual recommended fixes:

  • Disk Cleanup wizard.
  • DISM.exe /online /cleanup-image /restorehealth
    (This re-triggered the huge slowdown but completed successfully eventually.)
  • SFC.exe /scannow
  • Windows Update Troubleshooter
  • Removing c:\Windows\SoftwareDistribution\ and c:\Windows\System32\CatRoot2\
    (Requires stopping “Windows Update” and “Cryptographic Services” services first.)

The problem would, unfortunately, soon come back with varying rapidity.

I wondered if the high disk activity from the normal updating process was showing up a pending failure in my old SSD and generating loads of hardware interrupts or something casusing such an extreme slowdown. (I saw similar problems in the past on old Dell Optiplexes with faulty CD-ROM drives causing multiple processes to eat CPU). There were no disk-related Event Log errors; benchmarking of the SSD appeared fine; its software insisted all was OK; and Latency Monitor wasn’t giving me any obvious clues.

Yesterday, I managed to get Resource Monitor running while the problem was occurring and I noticed a lot of disk activity from TiWorker.exe on subfolders in c:\Windows\WinSxS\Temp\InFlight\ - a location new to me.

My WinSxS folder contained nearly 16,000 immediate child subfolders. It’s famously a folder not to play around in or delete things from – its massive size encourages people to fiddle! The existence of a subfolder there called “Temp” though piqued my interest. It contains subfolders called “PendingDeletes” and “PendingRenames” which I imagine are self-explanatory, but the InFlight one less so. My InFlight folder tree contained over 105,000 subfolders but only 30 actual files! This seemed crazy for a folder under something called “Temp”…

Interestingly, some things I read suggested that running DISM to try and fix such issues could just add yet more subfolders each time. Judging by some of the folder dates, I could well see that as having been being the case – with over 1000 being added on just one day around the same time.

There are some other references online to a busy InFlight folder causing updating slowdowns with most advice saying do not touch but none of it looking to be saying that from a position of definitive knowledge as to exactly why those subfolders (even when empty) might be required, or what they even do. I found one guy saying he’d actually deleted them to fix the problem with no apparent ill-effect.

I contemplated deleting them too but ultimately chickened-out and decided to do an in-place Windows install from a mounted 22H2 ISO instead. Afterwards, I checked, and the new InFlight folder contained around 300 subfolders. :-)

Since then, I’ve installed various post-ISO cumulative updates etc. My main WinSxS folder now contains over 20,000 folders (plenty more than before!) but my InFlight folder is now empty! And I’ve not even done a Disk Cleanup yet…

I would love to hear anyone else’s experiences with this folder and slow updates! I hope sharing this journey proves useful to others.