3 ms·
Pardon the (perhaps very silly) question, but... if you have enough RAM for the ramdisk, isn't that enough RAM to cache all the relevant files anyway? So the fi
by dexen 15y ago
Pardon the (perhaps very silly) question, but... if you have enough RAM for the ramdisk, isn't that enough RAM to cache all the relevant files anyway? So the file open()/read() would not hit HDD itself time and time again; they'd be served (by the OS) from cache?
Of course, cache warm-up would remain a possible problem source.
- simcop2387 15y agoI believe it's usually done (I've not had to do it) so that you can force some small set of data to always be in ram. This way even in the case of someone managing to cause something to leak memory the code will always be in ram. Whether this is really needed or not I can't say.
- e1ven 15y agoIn this case, it's because I don't want to assume that every dataset that will be used with this code stays in RAM, and it's simpler to handle things on the FS level by adding a new png to the stack, than to keep track of the images in RAM. This way the code can be "simpler"