File I/O can be a major performance bottleneck for many apps. It’s all too easy to read files in a way that is massively inefficient. Classes like FileStream
and BinaryReader
make it really easy to write super slow code. Today’s article explores why this happens and what can be done about it. Read on to learn more!
Posts Tagged file
At some point, every project ends up reading or writing to the file system. If you do anything more than storing a single blob of bytes (e.g. JSON text) then you’ll need to be very careful about performance. It’s easy to accidentally write code that takes way longer to read and write than it should and you won’t get any help from the compiler or from Unity. Today’s article reveals some of these traps so you won’t fall into them!