Finder keeps invoking attributesOfItemAtPath

44 views
Skip to first unread message

mixtly

unread,
Sep 27, 2017, 4:03:35 AM9/27/17
to OSXFUSE
When I start my FUSE app and enter it's mount folder in Finder, Finder keeps calling contentsOfDirectoryAtPath and attributesOfItemAtPath recursively for every file in my virtual file system. And it never stops. It calls several thousand times per second.
I now it's Finder process invoking these callbacks because I check the process PID in GMUserFileSystem.currentContext.

When I relaunch Finder it is silent until I enter the mount folder in Finder.

Is there some mount option or a way to prevent Finder from continuously querying the whole virtual file system. It is degrading performance in some cases.
Does anyone have similar issues? Try placing a log statement in attributesOfItemAtPath to get a feeling of how often this method gets called and for what paths.

mixtly

unread,
Oct 4, 2017, 7:57:19 AM10/4/17
to OSXFUSE
Solved. The issue was that in some cases in attributesOfItemAtPath for file modification or creation date, NSDate.date used to be returned which is always a new date. Finder.app won't settle and it will keep calling attributesOfItemAtPath until the date field on a file attributes becomes constant.
Reply all
Reply to author
Forward
0 new messages