• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MDItemCreate very, very, very, slow -- and fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MDItemCreate very, very, very, slow -- and fails


  • Subject: Re: MDItemCreate very, very, very, slow -- and fails
  • From: Doug Knowles <email@hidden>
  • Date: Tue, 14 Feb 2006 14:36:03 -0500

The code:

- (NSDictionary *)loadMetadata
{
	NSDictionary *md;
	NSString *path = [self valueForKey:@"uniqueIDValue"];
	NSLog( @"Fetching metadata for %@", path );
	MDItemRef mdi = MDItemCreate( nil, (CFStringRef)path );
	if  ( mdi != nil )  {
		NSArray *attrNames = (NSArray *)MDItemCopyAttributeNames( mdi );
		md = (NSDictionary *)MDItemCopyAttributes( mdi, (CFArrayRef)attrNames );
		CFRelease(mdi);
	}
	else  {
		md = [NSDictionary dictionary];
	}
	return md;
}

...and some clarifications:

- The code does work properly sometimes, then starts failing.
- I call this *a lot*; it's not inconceivable that I would invoke this
on hundreds of files, so a leak (most likely on my part) could be
trouble.

Thanks,
Doug K;

>
> What you're describing would be consistent with the framework's MIG
> call to mds timing out for some reason. It would be helpful if you
> could post a short example snippet that demonstrates this problem. If
> you can reproduce it, please file a Radar: <http://
> bugreport.apple.com.>.
>
> HTH,
>
> -- Kaelin
>
>
 _______________________________________________
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

  • Follow-Ups:
    • Re: MDItemCreate very, very, very, slow -- and fails
      • From: Kaelin Colclasure <email@hidden>
    • Re: MDItemCreate very, very, very, slow -- and fails
      • From: Ryan Britton <email@hidden>
References: 
 >Re: MDItemCreate very, very, very, slow -- and fails (From: Matt Neuburg <email@hidden>)
 >Re: MDItemCreate very, very, very, slow -- and fails (From: Kaelin Colclasure <email@hidden>)

  • Prev by Date: Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
  • Next by Date: Re: MDItemCreate very, very, very, slow -- and fails
  • Previous by thread: Re: MDItemCreate very, very, very, slow -- and fails
  • Next by thread: Re: MDItemCreate very, very, very, slow -- and fails
  • Index(es):
    • Date
    • Thread