Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with NSCollectionView



Greetings Everybody,

I'm writing an application that reads in a text file containing a number of individual messages. The messages are delimited by the pipe "|" character, and I'm trying to index the data inbetween the delimiters so that it can be searchable and reportable. I'm using Core Data for this. My managed object model is something like this:

Entity: File
- has a 1 to many relationship with the Message entity.

Entity: Message
- has a 1 to many relationship with the Field entity.

Entity: Field
- has a "value" property of type String.

I've written a method that reads in the text from a file, parses out the individual messages, and then within each message, parses out each field - all the while inserting this information into the managed object context. My method is pretty fast. I can index a file containing 162 messages in about 2.5 seconds. This performance is acceptable for my needs.

Now I'm trying to integrate an NSCollectionView into my application. Each view in the NSCollectionView contains a NSTextView containing the text of each message in a selected file. The NSCollectionView's "Content" binding is bound to an Array Controller that holds every open file. So when the user selects a new open file, the NSCollectionView updates accordingly by displaying that file's messages. This all works fine, but the problem is that with the NSCollectionView bound to the Array Controller, the performance is horrible! My CPU usage is at 100% and my application's memory usage runs off the chart! I can't seem to figure out what the problem is here. I know the problem isn't within my function that performs the indexing b/c this works just fine when the NSCollectionView is not hooked up.

Anybody have any clue what I'm doing wrong here? The NSCollectionView is a new class and unfortunately there isn't a lot of documentation on it just yet. Thanks in advance!
_______________________________________________


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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.