The docs for NSDataReadingOptions
state:
NSDataReadingUncached
A hint indicating the file should not be stored in the file-system caches. For data being read once and discarded, this option can improve performance.
That all makes sense. I'm curious if there's a way to know if a file already resided in the file-sysem caches.
For example, if I need to perform a large amount of file reading, it might make sense to prioritise reading files which already reside in the cache.
I am afraid here we can relay only some suppositions as no official documentation is available on this.
Some interesting links to read:
Your option to ensure that a file can be accessed quickly is to map the file onto a page of the virtual memory as described in the same doc of Apple.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With