• 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: NSMetadataItem performance issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMetadataItem performance issues


  • Subject: Re: NSMetadataItem performance issues
  • From: Vince DeMarco <email@hidden>
  • Date: Thu, 4 Aug 2005 10:56:54 -0700


On Aug 4, 2005, at 7:10 AM, Hamish Allan wrote:


On 3 Aug 2005, at 17:55, Vince DeMarco wrote:


You get this quickly you need to do a bulk fetch using the Sortiing attributes of MDQueryRef()


I think I must be missing something. If I set the sort descriptors of an query, it still doesn't cause the attributes to be copied, right? That's the whole point of having the sorting performed "server side", isn't it -- so that the attributes *don't* have to be copied?



Sorting is performed on the client not the server. So asking the query to sort basically tells the server to send along all of the sorting attributes no requests have to be made back to the server.



and the two calls.

MD_EXPORT CFIndex MDQueryGetIndexOfResult(MDQueryRef query, const void *result) MD_AVAIL;
and
MD_EXPORT const void *MDQueryGetResultAtIndex(MDQueryRef query, CFIndex idx) MD_AVAIL;



I also don't want either to get an index from a result, or to get a result from an index. I just want to get a copy of certain attributes from a result I already have a reference to, so that I can put them in a table!



Its not a mutex issue, each call to MDItemCopyAttribute() involves a mach_message to the server, a context switch and a mach_message back to you to return the result.


But why does the same operation sometimes take 1ms and sometimes 1000ms? And why, specifically, do those times when it takes 1000ms only ever occur when it's called from the table redrawing code, rather than in one of the tens of thousands of times it's called from my NSMetadataQueryGatheringProgressNotification handler?

The server is getting more and more overwhelmed and its taking longer and longer.


Of course there are bugs in our code. But the Spotlight menu is doing what i'm suggesting here and i don't have this particular performance problem (I do have others though, which i am working on fixing right now)

Vince


_______________________________________________ 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: NSMetadataItem performance issues
      • From: Hamish Allan <email@hidden>
References: 
 >RESEND: NSMetadataItem performance issues (From: Hamish Allan <email@hidden>)
 >Re: RESEND: NSMetadataItem performance issues (From: Vince DeMarco <email@hidden>)
 >Re: RESEND: NSMetadataItem performance issues (From: Hamish Allan <email@hidden>)
 >Re: RESEND: NSMetadataItem performance issues (From: Vince DeMarco <email@hidden>)
 >Re: NSMetadataItem performance issues (From: Hamish Allan <email@hidden>)

  • Prev by Date: Re: Faulty NSWindow connection in CoreData doc-based app?
  • Next by Date: Re: Faulty NSWindow connection in CoreData doc-based app?
  • Previous by thread: Re: NSMetadataItem performance issues
  • Next by thread: Re: NSMetadataItem performance issues
  • Index(es):
    • Date
    • Thread