Page MenuHome

Slow file IO on OS X with Blender v 2.68
Closed, ArchivedPublic

Description

--- Operating System, Graphics card ---
OS X, 10.8.4
16 GB RAM
2.3 GHz Core i7
512 GB Solid State Drive
NVIDIA GeForce GT 650M 512 MB

--- Blender version with error, and version that worked ---
The error occurs for me in versions 2.65 through 2.68. This problem does not occur in 2.64


--- Short description of error ---

Opening and saving files takes approximately 20-30 seconds. If i try to open or save a file immediately after a slow open or save, the interface responds immediately. If i wait a few minutes, it takes 20-30 seconds again to get the file browser.

I have tried trashing all of my preferences, removing all version of blender and reinstalling, repairing disk permissions.

The steps below are just about a texture, but its nearly any file I/O operation i've tried that has this problem. I would be happy to provide any logs requested or try to take a video screen capture demonstrating the problem.

The attached blend file is the basic start up with a single texture attached to the cube. this happens for me in every file -- even one with no meshes in it at all.

--- Steps for others to reproduce the error (preferably based on attached .blend file) ---

(1) Open the attached .blend
(2) Go into the material panel or the node editor (happens in both) and click the browse button on the image texture
(3) The first time you do this, it takes 20-30 seconds
(4) close the browser and try again immediately, the file browser opens right up.
(5) wait a few minutes, try again, it will take 20-30 seconds

Details

Type
To Do

Event Timeline

I tried with your and with my own files but couldn't reproduce the problem. The filebrowser opens in a blink.

OS X, 10.8.5
8 GB Ram
2.8 GHz Core i7
HD
ATI Radeon HD 4850 512 MB

i got the same response on blender guru. nonetheless, it takes 20 seconds every time i start a file browser. is there some log file pertinent to this that i could attach?

Do you have any network drivers, USB drivers, dropbox folders, ... or other things that might be influencing this?

The example steps you give is for image textures. Does it also happen when you open .blend files? If it's only images it may be that there is some file that Blender has trouble generating a preview for.

> Do you have any network drivers, USB drivers, dropbox folders, ... or other things that might be influencing this?

network drivers -- whatever comes stock in OS X. i do have network drives, however. I also have a dropbox folder. Do you have any suggestions on how to isolate possible problems in here?

> The example steps you give is for image textures. Does it also happen when you open .blend files? If it's only images it may be that there is some file that Blender has trouble generating a preview for.


it happens for any file operations. if i open the default blend and try to save it as new immediately i get a 20 second wait.

Hi
I tested your file on 10.8.5 as well as on 10.9.
No slowdown occures here.
I personally think you get timeouts due some device either
hanging or perhaps fall to sleep.
Check the console log for such events pls.

Jens

Kristian, I did mean to type network drives, that's mostly likely influencing it then. What you could do is check if the system and system bookmark folders in Blender are different between 2.64 and 2.65, and take some screenshots of that part of the UI so we can see if there is anything strange.


Jens, there were a bunch of changes in the file browser between 2.64 and 2.65:
https://projects.blender.org/scm/viewvc.php/trunk/blender/source/blender/editors/space_file/fsmenu.c?view=log&root=bf-blender&pathrev=53508

I suspect that it is somehow trying to mount some network drive that is slow to respond or not responding, maybe some different API functions that we use. Probably still a bug in Blender if that's the case, since ideally Blende shouldn't become unresponsive just because the network is slow.

Kristian, I experience the exact same problem as you (with more or less identical hardware).

I do have USB-drives and a NAS but access to them is very fast from Finder and other applications.
It does not matter *what* is saved or loaded: most file-related tasks are slow, and worst of all (psychologically) is opening the file browser. Just pressing Ctrl-S for save is actually quite quick.
Whether or not this is related to network or USB drives, it's still an issue with Blender since no other application has this problem.

I've tried to search the system logs for anything that might be related. The only thing I've found is this timeout, but I'm not even sure it happens every time.
2013-10-12 21:31:54,703 mDNSResponder[45]: ERROR: mDNSPlatformWriteTCP - send Broken pipe
2013-10-12 21:31:54,703 mDNSResponder[45]: tcpConnectionCallback: error writing
Anyone seen this?

Brecht,

Differences i noticed:

___ LEFT PANE ______
(1) 2.64 has two more folders in the System area (net and home); neither of these are in 2.68
(2) Bookmarks are divided between System Bookmarks and Bookmarks in 2.68
(3) 2.68 does not have "Trusted Source" checked but 2.64 does for a file open (Apple + O)
(4) In 2.64 there is a "Reset" button at the bottom of the left pane and not in 2.68.

___ TOP OPTIONS _____
(1) 2.68 has a filter option for ".blend1", ".blend2" etc, files


Not a difference, but perhaps relevant: my dropbox folder is bookmarked in 2.64 under Bookmarks and 2.68 under System Bookmarks

I just tried checking Trusted Source in 2.68 and that does not appear to help.


Further note: I disabled my wifi interface, quit 2.68 and reopened. Blender opens in a fraction of the time that it does when the wifi is on, and file IO operations are instantaneous. I didn't realize it was slow before, but "Viewport Shading" = "Render" when using Cycles starts crazy fast when the network is disabled. there was a noticeable lag before (i am guessing from Cycles loading the textures for a render).

As soon as I turn WiFi back on, the whole thing slows down again.




Finally, I am a computer programmer. If you want me to do any kind of technical operation or logging I am happy to help. Just give me some general instructions.

Hi
I'am trying atm. to "simulate" a slow network or USB device.
Guess i need a slow device with a huge filecount ( perhaps i try my Kindle ).
Away from this /home and /net supressed are on purpose due meaningless ( afaik we did for bw compat. )
What i experienced for now is networkdevices not immidiately shown in Blender when connected after Blender lauch.
Must investigate.

Away from this under "normal" conditions with network atached all looks fast here.

Stay tuned ...

Jens

Kristian, if you have gdb installed, you could run Blender from the terminal in it, for example:
gdb /Applications/Blender/blender.app/Contents/MacOS/blender

Then when you open the file browser and it freezes, go into the terminal and press ctrl+c to break. Then type "bt" to get the backtrace, so we can see in which function it is frozen.

Ideally we can redo the issue ourselves since then it will be easier to find the solution, but if that doesn't work, knowing which function freezes could be quite useful.

Kristian, are you able to compile yourself ?
I could commit a testpatch, that has imho better behaviour.

Jens

Hi
I commited again my further tested new method for getting volumes.
This is much cleaner and allows for being independent on
user-defined visibility settings from finder, which caused some confusion
to users. ( a finder hidden volume was also not shown in blender fs )
Please test and report.

Jens

Brecht

I tried grabbing the backtrace while it was frozen, but gdb wouldn't respond. the backtrace once blender became responsive again was this:

#0 0x00007fff8ba6abd2 in getattrlist ()
#1 0x00007fff8dc4d918 in FSMount::getattrscore ()
#2 0x00007fff8dc42374 in FSMount::_getattrs ()
#3 0x00007fff8dc42237 in FSMount::getattrs ()
#4 0x00007fff8dc5c1d4 in _FSGetCatalogInfoByName ()
#5 0x00007fff8dc344f4 in FindTarget ()
#6 0x00007fff8dc730e2 in SearchAllVolumes ()
#7 0x00007fff8dc334b0 in FSMatchAliasInternal ()
#8 0x00007fff8dc329a0 in FSMatchAliasBulk ()
#9 0x00007fff8c5d0a1f in LSSharedFileListItemGetFSRef ()
#10 0x00007fff8c5d04ca in LSSharedFileListItemResolve ()
#11 0x00000001004617ea in fsmenu_read_system ()
#12 0xff7000010000000c in ?? ()
Previous frame inner to this frame (gdb could not unwind past this frame)


Jens -- i havent compiled Blender from scratch before. what would be involved in doing this ?

Hi Kris

I prepared a testbuild, just check if this fixes the problem:

URL: http://www.jensverwiebe.de/Blender/blender_test.zip

Jens

..followup

If this still does not help, pls try delete your "recents" list and perhaps "bookmarks", as the 20seconds delay
sounds to me as the std network timeout, aka, you try read a file or dir, not available/mounted.

Jens

Jens

that patch didnt help. Also, in the build you gave me there were no recents or bookmarks and it still has the 20 second lag.

So i solved the problem, on my side at least. I went through removing my system bookmarks one by one and re-testing. My "Network" bookmark in the finder was apparently the culprit. Once i removed it Blender became immediately responsive.

Unfortunately, when i went back to try to put it back on to test it again, i no longer seem to be able to put the Network as a system bookmark (although i can put it in the chrome at the top of the finder ... where it isnt causing any problems). So it looks like i had a legacy bookmark in my finder list that isn't allowed by OS X anymore (i am assuming).

Right, such can happen rarely when doing consecutive systems updates ( major indeed ) and no cleanup happens for
results of dropped features.

Anyway, as i expected the issue seems to be just a timeout, so we might close this ? ..or add a check ?

Jens

I am satisfied -- as long as this thread stays around to help other people who get weird file IO slowness.

Agree delays here is not nice at all, but this is common for all the platforms and also common for other applications. Would be nice to have timeout thing, but not sure whether it's implementable for all platforms.

For now added note to our TODO list: http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Install-OS#Common

Thanks for the report, but considering this is a TODO :)

Sergey Sharybin (sergey) closed this task as Archived.Oct 17 2013, 1:56 PM