rust-embedded-community / embedded-sdmmc-rs

A SD/MMC library with FAT16/FAT32 support, suitable for Embedded Rust systems
Apache License 2.0
311 stars 73 forks source link

Add a block cache #7

Open thejpster opened 4 years ago

thejpster commented 4 years ago

It would improve performance if we had a write-through block cache, particularly in the cluster allocation loop or for multiple small writes (as we'd avoid the repeated reads).

The user would need to supply the storage, and we just need a basic structure to track which sectors are cached (e.g. a HashMap). Maybe using heapless?

thejpster commented 4 years ago

It might also help if read and write were done through closures instead of by copying memory.

thalesfragoso commented 4 years ago

The managed crate also has some useful structures, and it's used with good success on smoltcp.

thejpster commented 2 days ago

Closed by #148