Re: Deleting files extremely slow since OSX High sierra
Re: Deleting files extremely slow since OSX High sierra
- Subject: Re: Deleting files extremely slow since OSX High sierra
- From: Mike Throckmorton <email@hidden>
- Date: Mon, 23 Apr 2018 07:36:26 -0400
Try replacing FSDeleteObject with [[NSFileManager defaultManager]
removeItemAtPath: pth error: &erro];
Worked for me.
Delete of folder containing 7500 files went from realllly slow down to nice and
quick.
I also found that other older FSRef based api's got slow.
Sandboxing? Discouraging use of elderly API's?
Time to ditch the old stuff anyway.
Vojtûch Meluzín Sunday, April 22, 2018 9:55 PM
> Hi,
>
> I have a custom installer, which places various audio plugins (bundles)
> onto the target system and as an uninstaller it removes them. It manages
> them the same way as any other folder (containing folders and files). Since
> OSX High sierra deleting these files became extremely slow, almost like the
> OSX is checking the bundles after every change. On some computers it also
> blocks write access to the files inside these bundles (e.g. if the
> installer is used again). It almost seems like some pseudosecurity measure
> gone wrong, not the first time on OSX after all...
>
> Any ideas what is going on? For the record I'm using FSDeleteObject to
> delete files/folders, I know deprecated, but I don't see a reason for
> messing up with new API if the old one works.
>
> Thanks in advance.
> Vojtech
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
-----------------------------------------------
Mike Throckmorton email@hidden
Software Engineer
My Mac running Mac OS X has been up 4 days,
running Mac OS X and it's starting to drift.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden