Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 15, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

In #1890 I demonstrated that it's possible to dehydrate folders
without unmounting at all. Unfortunately that requires deleting all the
placeholders and hydrated files which is too slow for dehydrating
anything substantial. The current implementation avoids this by moving
instead of deleting (which has the additional benefit of providing a
backup) but ProjFS doesn't support moving or renaming folders, so we
can't do that while mounted.

This pull request takes a different approach to reducing the overhead
of unmounting for dehydration. Instead of unmounting, moving, and
remounting from the dehydrate verb, those steps are moved into the
mount process under its dehydrate message handler. The mount process
only disposes and recreates the components required for virtualization,
avoiding several costly steps (eg authentication with Azure DevOps,
verification of the cache server, verification of ProjFS installation).
For the repo I work in, dehydrating a top-level directory is reduced
from 33 seconds to 11 seconds with this change.

Specific changes:
* Backup of non-src folders (.git, .gvfs) is added to dehydrate folders.
Previously it was only done for full dehydrate.
* Unmount, move/backup of folders, and mount are moved from
DehydrateVerb to InProcessMount. To support this, the DehydrateFolders
message has the backup folder added to its fields.
* The core methods of Mount and Unmount have a parameter added to skip
disposing (on unmount) and initialization (on mount) of certain
components which are ok to leave alive during the temporary unmount.
* Ownership of GVFSContext disposal fixed - FileSystemCallbacks was
disposing it despite not owning it.
* Missing disposal of a file stream in BackgroundFileSystemTaskRunner
is fixed.
* WindowsFileSystemVirtualizer.DehydrateFolder will now delete a
tombstone file for the directory if present. This allows us to support
fixing a directory that the user manually deleted while mounted (perhaps
in a misguided attempt to dehydrate it), though that would typically
require running 'gvfs dehydrate --no-status' to skip verifying that the
working directory matches the index.
* '--no-status' is now supported with '--folders'
@pull pull bot locked and limited conversation to collaborators Jan 15, 2026
@pull pull bot added the ⤵️ pull label Jan 15, 2026
@pull pull bot merged commit 8ccb768 into cgallred:master Jan 15, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant