I feel that I must first describe what I am trying to do, and then I will ask my question (s).
Background
I have a large number of words (maybe up to 5000). I want to be able to display random 3 of these words on the screen, and when the user clicks the button, he displays 3 more random words, but without duplicates (i.e., without repeating the same word to the user). This will start before the timer expires.
Possible Solution
If the number of words was less, I would just add them to the NSMutableSet, use -anyObject 3 times to get the words, and then remove 3 words from the set each time so that they are no longer used, then I call -anyObject. The problem with this is I don’t know if I can have a set with 5000 NSStrings in it in iOS.
Question
So my questions
- Can I have a collection object (NSSet, NSArray, NSDictionary) with approximately 5000 lines in it in iOS without any performance issues?
- If not, how will I read reading a subset of the lines from the file to get an acceptable array size and then pulling out more when I empty this array?
- ? , . .
.