Botspot wrote: ↑
Mon Oct 12, 2020 10:08 pm
Believe it or not, with enough optimization
, it can be faster to download an img, extract it, and flash it to a SD card, than to flash a local, pre-extracted .img to a SD Card.
Yes I'm sure it can.
Its incredibly complicated given: different read/download speeds, decompression speeds, indeterminate overlap between reads and writes, disk write speeds, variable asynchronous disk block prefetch ranges, "sync" time, verification time, etc etc
Given all the above variables, any simple benchmark results will be meaningless ...
For example, I usually download the image to a memory disk, then uncompress it and copy it to the raw device.
So, given that the disk read times are near zero for this case only, whats the best read/write block size to give dd for the optimal overlap between reads and writes?
I gave up trying to calculate everything and produce an optimal C program!
Now I just use "cp" - its simple to use and fast enough in practice (slightly faster than dd bs=1m)