@bkerler This is an improvement for sparse image flashing performance. Can optimize for less RAM usage later but currently hard to modify with current code structure.
This is before the change flashing sparse image after a while
This is because we used to do self.tmpdata = self.tmpdata[length:] which allocates a new array every time we do that, and self.tmpdata can be very large allocating a large array everytime can be very expensive (demonstrated in the picture that it slows down alot)
After the change: the flashing speed is consistent around 55 MB/s for me. And flashing is now from 22 mins (from the above image) to 3min
@bkerler This is an improvement for sparse image flashing performance. Can optimize for less RAM usage later but currently hard to modify with current code structure.
This is before the change flashing sparse image after a while![image](https://github.com/bkerler/edl/assets/47828508/66ece9a4-aad0-4579-a8e2-8107beb692f9)
This is because we used to do
self.tmpdata = self.tmpdata[length:]
which allocates a new array every time we do that, and self.tmpdata can be very large allocating a large array everytime can be very expensive (demonstrated in the picture that it slows down alot)After the change: the flashing speed is consistent around 55 MB/s for me. And flashing is now from 22 mins (from the above image) to 3min
Edit: it gets worse (this is before the PR):![image](https://github.com/bkerler/edl/assets/47828508/9d091bc1-2426-4648-9bf0-301d68e00b20)