Re: Is there a *much* faster FSRef conversion than CFURLCreateFromFSRef()?
Re: Is there a *much* faster FSRef conversion than CFURLCreateFromFSRef()?
- Subject: Re: Is there a *much* faster FSRef conversion than CFURLCreateFromFSRef()?
- From: Rosyna <email@hidden>
- Date: Tue, 12 Sep 2006 08:03:18 -0700
Well, I guess the question is, why do you need the path? If you can
avoid making a path at all, then you won't see the speed hit. Making
the path is heavy because it has to do I/O on the disk. you can also
avoid the hit if you *have* to have a path by only creating paths for
folders. Since every file inside a directory will have the same
parent path when iterating it.
Ack, at 9/12/06, Alan Smith said:
I'm using FSRefs to make a speedy directory enumerator. When I
"sampled" it with Shark I found, to my dismay, that the slowest part
was CFURLCreateFromFSRef(). Actually the slowest function was
FSRefMakePath() which CFURLCreateFromFSRef() uses. After googleing in
hopes of finding a faster way I was forced to stick with the slow
FSRefMakePath(). I say it is slow because in an enumeration test of
/Applications 22% of the time was spent in that function, which (IMHO)
is too long.
Preferably there is a way to get a CFStringRef or NSString but if I
have to use a URL I'll survive.
I apologize if this is the wrong place to ask this, but I don't know
of another awesome mailing list like this one. If you do, and this is
the wrong place for this question, please redirect me.
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden