A non-trivial percentage of the time VS, VSCode, Windows Explorer, cmd.exe, etc., can have a lock on a directory and prevent git from deleting it when changes are made to which file paths are sparse checked out. When this happens, even though no files are in those directories, git still warns and expands then index slowing all commands down.
It would be nice if the index expansion could be skipped for empty directories.