fetcher: Send Accept-Encoding: gzip when downloading summary
The summary file can get large, but it compresses well (something which is not true of other files in the ostree repo which are already compressed). By sending Accept-Encoding: gzip (and handling the compressed results) we send a lot less data. I set up the flathub repo (http://flathub.org/repo) to enable gzip for the summary file (only), and the result is that the 331514 byte large summary was transferred in 122889 bytes. On my (fast) network this decreased the time i took to do "flatpak remote-ls flathub" by about 100msec. This fixes https://github.com/ostreedev/ostree/issues/802 Closes: #882 Approved by: cgwalters
This commit is contained in:
1 parent
56188808b4
commit
be0c02d4f9
4 files changed
+16
-3
No files matched your search
@@ -48,7 +48,8 @@ struct OstreeFetcherClass
|
||||
|
||||
typedef enum {
|
||||
OSTREE_FETCHER_FLAGS_NONE = 0,
|
||||
OSTREE_FETCHER_FLAGS_TLS_PERMISSIVE = (1 << 0)
|
||||
OSTREE_FETCHER_FLAGS_TLS_PERMISSIVE = (1 << 0),
|
||||
OSTREE_FETCHER_FLAGS_TRANSFER_GZIP = (1 << 1)
|
||||
} OstreeFetcherConfigFlags;
|
||||
|
||||
void
|
||||
|
||||
Reference in new issue
Block a user