Some download are missing ui hints

Bug #1597387 reported by Sergio Schvezov
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Sergio Schvezov

Bug Description

A progress bar or spinner would be a welcome improvement for some downloads

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
Revision history for this message
Seth Arnold (seth-arnold) wrote :

+ with open(destination, 'wb') as destination_file:
+ for buf in request_stream.iter_content(1024):
+ destination_file.write(buf)

I think with today's AF drives and SSDs this may incur write amplification; AF sectors are 4KB, SSD page sizes often are 8KB but can be larger.

I suggest working with larger blocks than 1024 bytes. 8192 would be a better choice. Most drives are happiest writing blocks of 128KB at a time. Hopefully the OS can coalesce these small writes into fewer writes to the underlying block devices but if we submit IO in large pieces in the first place, the OS won't have to coalesce writes.

Thanks

Revision history for this message
Leo Arias (elopio) wrote :

Thanks for the comment Seth. Can you please open a new bug for that?

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Done, 1612465. Thanks Leo.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.