Page MenuHome

Fix T85689: Assume Win32 Volumes are Valid
ClosedPublic

Authored by Harley Acheson (harley) on Mar 30 2022, 7:01 PM.

Details

Summary

Skip validation when inserting items into the Win32 "Volumes" list.
This fixes some long hangs when launching Blender with disconnected
network shares.


T85689: Start up hangs when a disconnected mapped network drive is present on Windows shows remote users who launch Blender while a mapped network drive is not operational, either because they have not connected their VPN or the server is off or otherwise not sharing. On the Windows platform this can cause long pauses. They report 30-second (and longer) delays during Blender startup.

This is caused by the validation of FSMenu items during insertion. That validation uses BLI_exists, which does a stat that causes the delay. This patch adds an optional behavior to FSMenu insertion to assume valid, and does this for (only) the initial creation of the Windows Volumes list. This is a list of drives we get from the operating system and it is pretty fair to just use them as-is without double-checking.

The user could still experience the same delay of course if they click on the link after Blender launches. But that seems a better time for this since they could use Blender without using the offending drives. And note that clicking the "refresh" button will still validate everything.

This patch was tested by the affected users here: https://developer.blender.org/T85689#1323524

Note that we did fix another similar issue where SHGetFileInfoW could pause when gathering volume names with D14305: Fix T85689: Replace SHGetFileInfoW for Drive Name. Unfortunately that did not fix all network-related pausing.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Mar 30 2022, 7:01 PM
Harley Acheson (harley) created this revision.
Harley Acheson (harley) retitled this revision from T85689: Assume Win32 Volumes are Valid at Startup to Fix T85689: Assume Win32 Volumes are Valid.
This revision is now accepted and ready to land.Mar 30 2022, 7:47 PM