Ceiridge / WinFsp-MemFs-Extended

tmpfs for Windows / Fully dynamic RAM disk by extending WinFsp's memfs to be variable size and maximally resource efficient without compromising performance
GNU General Public License v3.0
51 stars 2 forks source link

Improve performance with intelligent allocations #6

Open Ceiridge opened 1 year ago

Ceiridge commented 1 year ago

Performance can be improved by dynamically allocating a rather big block/amount of sectors while a file is being written to. Once the file is fully written, the spare sectors can be deallocated. This is similar to ArrayLists, in most cases without the disadvantage of wasting memory. Also, the sectors can be of dynamic size by storing a pointer to the next sector directly next to the data.

Ceiridge commented 1 year ago

Before the file is written to, the new file size is already known and it is already allocated accordingly. Also, dynamic sizes would in total decrease performance even more, because random access would not be possible and sizes would have to be stored.

Ceiridge commented 1 year ago

This could work with search trees. Further research is needed