Re: Get size of folder
Re: Get size of folder
- Subject: Re: Get size of folder
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 19 Aug 2009 11:56:16 +0200
Le 19 août 2009 à 11:47, Charles Srstka a écrit :
On Aug 19, 2009, at 4:24 AM, Alastair Houghton wrote:
As I think I may have mentioned before, contrary to apparently
widespread opinion, Carbon isn't magic. The Carbon file manager
APIs are based on BSD APIs, and calling the BSD APIs in question is
going to be faster if you really need high performance because they
don't have to map things to the Carbon API's data structures and
back again.
I *knew* I'd read somewhere that this wasn't true - that the Carbon
file manager doesn't use the same opendir() / readdir() APIs that
you'd use if you were doing this the BSD way,
If you don't believe Carbon use the BSD API, just do a simple File
Manager based application, and check what append in Shark or other
sampling software when you run it, or even better, use DTrace to check
what syscall is used.
In some rare cases, it uses 'private' syscall (like delete) to perform
operation that do not have equivalent in BSD world (returning an error
when trying to delete a busy file for instance).
and that someone had benchmarked Cocoa vs. Carbon vs. BSD, and
Carbon came out on top. What I didn't remember was that it was you
who did it:
The last time I saw this kind of benchmark, the BSD code were poorly
implemented and did not use the proper functions. That's why it was
slower.
_______________________________________________
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