On Wed, 2004-06-16 at 18:01, Greger Cronquist wrote: > Hi again, > > This issue solved itself rather annoyingly since we use flash memory in > our newer devices (which had slipped my mind). So we must erase the > memory first and then load.
Last time I played with flash, you could erase a block at a time. The flash erase and write times are quite long, and flash has a limited number of write cycles, so avoiding any re-writing is a good idea. The simple solution here is a flash block aligned signature, and do a block by block compare/transfer, so only blocks that are changed are transfered/erased/written. There is no benefit to a byte-aligned rolling window/checksum, unless you do some fancy partial-in-RAM updating tricks before erasing/writing the blocks. Another complicated variant that might be useful if your data size is significantly larger than the flash block-size would be an rsync-like algorithm that "rolls" a flash-block-aligned (instead of byte aligned) window (rsync-block) through the flash. This would only be worth it if the window was at least 8 times the size of the flash-blocks. If you want to experiment with these kinds of algorithms, I thoroughly recommend pysync... it would be easy to implement and test all these variants using it. -- Donovan Baarda <[EMAIL PROTECTED]> http://minkirri.apana.org.au/~abo/ -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html