Long startups after network drives are disconnected #63748

Closed
opened 4 years ago by ZachHixson · 14 comments

System Information
Operating system: Windows 10
Graphics card: GTX 1070 & GTX 970

Blender Version
Broken: 2.80.0-git.860a9f979d60 & Blender 2.79

Short description of error
When Blender is used to save to or load from a network drive, and then the network drive disconnects, Blender startup times can be increased by 10x in my tests. Normally Blender opens almost instantly, but in 2.79 it could take up to a minute after a drive was disconnected. In 2.8 it's a little better, but still noticeably slower.

Exact steps for others to reproduce the error

  • Open Blender
  • Save or load something from network drive
  • Disconnect network drive
  • Re-open Blender and it will take a lot longer to open

I have found that clearing the "Recent" files in the file explorer will reset this problem until you need to use a network drive again. I have not tested this with a "Mapped," network drive, so clearing recent files might not help in that case.

**System Information** Operating system: Windows 10 Graphics card: GTX 1070 & GTX 970 **Blender Version** Broken: 2.80.0-git.860a9f979d60 & Blender 2.79 **Short description of error** When Blender is used to save to or load from a network drive, and then the network drive disconnects, Blender startup times can be increased by 10x in my tests. Normally Blender opens almost instantly, but in 2.79 it could take up to a minute after a drive was disconnected. In 2.8 it's a little better, but still noticeably slower. **Exact steps for others to reproduce the error** - Open Blender - Save or load something from network drive - Disconnect network drive - Re-open Blender and it will take a lot longer to open I have found that clearing the "Recent" files in the file explorer will reset this problem until you need to use a network drive again. I have not tested this with a "Mapped," network drive, so clearing recent files might not help in that case.
Poster

Added subscriber: @ZachHixson

Added subscriber: @ZachHixson
ZedDB commented 4 years ago
Collaborator

Added subscribers: @ideasman42, @ZedDB

Added subscribers: @ideasman42, @ZedDB
ZedDB commented 4 years ago
Collaborator

This should have been fixed a while ago with 01a8216a4b, but it seems like the issue is back now. I don't have any network drives to reproduce this with.

@ideasman42 and you reproduce this?

This should have been fixed a while ago with 01a8216a4b, but it seems like the issue is back now. I don't have any network drives to reproduce this with. @ideasman42 and you reproduce this?
Owner

This is caused by bookmark reading & validation

  • ED_file_read_bookmarks() opens $HOME/.config/blender/2.80/config/bookmarks.txt
  • Under [Recent] there is the directory of the latest written files directory.
  • This directory is added via fsmenu_read_bookmarks, see: fsmenu.c:459, fsmenu_insert_entry(fsmenu, category, line, name, FS_INSERT_SAVE).
  • fsmenu_entry_refresh_valid calls BLI_is_dir which will hang when running on a network drive in some cases.

Introduced by 0dfdca6d13

AFAICS solution is to revert this change, remove checking the path from drawing too.

This is caused by bookmark reading & validation - `ED_file_read_bookmarks()` opens `$HOME/.config/blender/2.80/config/bookmarks.txt` - Under `[Recent]` there is the directory of the latest written files directory. - This directory is added via `fsmenu_read_bookmarks`, see: `fsmenu.c:459`, `fsmenu_insert_entry(fsmenu, category, line, name, FS_INSERT_SAVE)`. - `fsmenu_entry_refresh_valid` calls `BLI_is_dir` which will hang when running on a network drive in some cases. Introduced by 0dfdca6d13 AFAICS solution is to revert this change, remove checking the path from drawing too.
mont29 was assigned by ideasman42 4 years ago
mont29 commented 4 years ago
Owner

'Reverting' that change will only move the problem further, now people will have 'invalid' bookmarks on which they will click, and have again to wait 30 secs of freeze in the file browser…

Besides cursing Microsoft to Hell for not being able to provide a proper way to check for network-related paths in a non-blocking way (checked, there seems to be no real solution here, only hacks and workarounds), I think the only real solution is to keep the start-up check, but put it into an async job… :(((

'Reverting' that change will only move the problem further, now people will have 'invalid' bookmarks on which they will click, and have again to wait 30 secs of freeze in the file browser… Besides cursing Microsoft to Hell for not being able to provide a proper way to check for network-related paths in a non-blocking way (checked, there seems to be no real solution here, only hacks and workarounds), I think the only real solution is to keep the start-up check, but put it into an async job… :(((
Owner

@mont29, wouldn't this be an improvement to avoid the delay until the user clicks on it?
Then at least it's an explicit action without overhead on startup.

Otherwise loading Blender: external drives spin up & network paths need to be checked.
Even on other platforms this can add overhead (if the network has a lot of traffic for eg).

@mont29, wouldn't this be an improvement to avoid the delay until the user clicks on it? Then at least it's an explicit action without overhead on startup. Otherwise loading Blender: external drives spin up & network paths need to be checked. Even on other platforms this can add overhead (if the network has a lot of traffic for eg).
mont29 commented 4 years ago
Owner

@ideasman42 might be an improvement, but I can bet you we'll end up getting bug reports 'my file manager hangs for 30 secs when I click on a bookmark' as well. So would say either we consider current situation as not-so-good but known limitation, or we go for some fully async check of the bookmarks (at startup). Think this should not be a big change anyway, we are already using jobs to list files, we can as well do it to check bookmarks too. ;)

@ideasman42 might be an improvement, but I can bet you we'll end up getting bug reports 'my file manager hangs for 30 secs when I click on a bookmark' as well. So would say either we consider current situation as not-so-good but known limitation, or we go for some fully async check of the bookmarks (at startup). Think this should not be a big change anyway, we are already using jobs to list files, we can as well do it to check bookmarks too. ;)
Owner

Maybe get 2nd opinion on this...

  • Agree async is nice, but...
  • For 2.80 we could not validate paths on load (as we had in previous releases), to avoid slow load times.
Maybe get 2nd opinion on this... - Agree async is nice, but... - For 2.80 we could not validate paths on load (as we had in previous releases), to avoid slow load times.
mont29 commented 4 years ago
Owner

Well, we had current behavior for 4 years… So clearly not a critical issue either, if we go that way I’d say keep current behavior for 2.80 altogether. ;)

Well, we had current behavior for 4 years… So clearly not a critical issue either, if we go that way I’d say keep current behavior for 2.80 altogether. ;)
ZedDB commented 4 years ago
Collaborator

My two cents:

I think that network operations like these should be non-locking as quirky network drives might lock up blender for long periods of time.

For me personally, I would like i more if the files would be queried when you try to access them. But I do agree with @mont29 that we will probably get new tickets about that too. :/

Maybe we could add some UI stuff that notifies the user that we are looking up the network things? So that they know something is happening and that blender just didn't lock up.

My two cents: I think that network operations like these should be non-locking as quirky network drives might lock up blender for long periods of time. For me personally, I would like i more if the files would be queried when you try to access them. But I do agree with @mont29 that we will probably get new tickets about that too. :/ Maybe we could add some UI stuff that notifies the user that we are looking up the network things? So that they know something is happening and that blender just didn't lock up.
Owner

While we can get complaints either way, validating on startup can backfire:

  • Open Blender.
  • Plug in external drive.
  • Open a file browser.
  • The bookmark is missing even though the path it points to is now valid.
While we can get complaints either way, validating on startup can backfire: - Open Blender. - Plug in external drive. - Open a file browser. - The bookmark is missing even though the path it points to is now valid.
Collaborator

This issue was referenced by 6dceafbde3

This issue was referenced by 6dceafbde392ce0b2c2086d0906acf638d9902b2
mont29 commented 4 years ago
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
mont29 closed this issue 4 years ago

Added subscriber: @erminos

Added subscriber: @erminos
Sign in to join this conversation.
No Label
Interest/Alembic
Interest/Animation & Rigging
Interest/Asset Browser
Interest/Asset Browser Project Overview
Interest/Audio
Interest/Automated Testing
Interest/Blender Asset Bundle
Interest/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
Interest/Eevee & Viewport
Interest/Freestyle
Interest/Geometry Nodes
Interest/Grease Pencil
Interest/ID Management
Interest/Images & Movies
Interest/Import/Export
Interest/Line Art
Interest/Masking
Interest/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
Interest/Python API
Interest/Render & Cycles
Interest/Render Pipeline
Interest/Sculpt, Paint & Texture
Interest/Text Editor
Interest/Translations
Interest/Triaging
Interest/Undo
Interest/USD
Interest/User Interface
Interest/UV Editing
Interest/VFX & Video
Interest/Video Sequencer
Interest/Virtual Reality
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
Module › Animation & Rigging
Module › Core
Module › Development Management
Module › Eevee & Viewport
Module › Grease Pencil
Module › Modeling
Module › Nodes & Physics
Module › Pipeline, Assets & IO
Module › Platforms, Builds, Tests & Devices
Module › Python API
Module › Render & Cycles
Module › Sculpt, Paint & Texture
Module › Triaging
Module › User Interface
Module › VFX & Video
Platform/FreeBSD
Platform/Linux
Platform/macOS
Platform/Windows
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information from Developers
Status › Needs Information from User
Status › Needs Triage
Status › Resolved
Type › Bug
Type › Design
Type › Known Issue
Type › Patch
Type › Report
Type › To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#63748
Loading…
There is no content yet.