I am looking for advice on good software design with this post. I have a program that reads a number of data files and plots the data, or calculates new data, depending on which entries are selected. It works great for a smaller number of data files (say up to a 500). For each file, a dataclass instance is created. This instance reads the data, stores it in a NSString and adds several more objects to this instance, based on the data it just read. Now, I have over 30.000 datafiles to process. Needless to say, my program is choking on it. I guess I have to add some kind of data caching to it, only reading data that is only in use. The question being, should I add cache logic to every data object (bottom-up decision) or should I make a new object that makes such decisions for the data objects (top-down decision)? Or something else? What is the best method? I guess i am looking for some advice from someone with a more experience. Would using NSData objects, and c-array's and floats help instead of NSMutableArray and NSNumber? I use these because they are easy to work with and pass around the different methods, without worrying to much about pointers and memory allocation.