On Jan 20, 2008, at 8:35 AM, Christiaan Hofman wrote: > Would it be possible to initialize the SKIndexRef on the thread > rather than in init? I find that initializing the cached index blocks > the UI for a very noticeable time. I think the index can be accessed > on the main thread only in the -index method and in - > cancelForDocumentURL:.
Can you check with Shark or Spin Control to see what's slow? Initializing the index on the thread would require avoiding NSFileManager, unless it's only the SKIndex creation that's slow. > Actually I think there may be a problem currently in - > cancelForDocumentURL:, because the index can be released/set to NULL > both on the main thread and the notification thread. That's dangerous. The condition lock is used specifically to prevent this; the cancel method can't write the index until the thread exits. The index is set to NULL only in case of an exception, but the lock isn't released until the @finally. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop