i had encountered with program-design problem. It's in the following - in my app i have to load a lot of image data. and i'm not sure - if there will be enough memory for it. even if it will, i don't want my program eat too much memory. i first decided load all image data i need, but then i think, that i can read it from the disk when necessary, but in this case i'm not sure in the speed - is reading from hard-disc enough fast? I don't want my user have to wait.
i'm too hasty. i calculated amount of memory which all my data will take. it's not so large - just about 5-50 mb (depending on image size, i will use. Anyway - 50 mb is a ceiling). But question about speed of reading data from disk is in force - in common cases - would it better to load data when necessary or load it at once?