-
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large downloads can take up all memory #668
Comments
I've recently added flatpak_download_http_uri() which is used in some places to download directly to disk. Moving extra data to use that seems like a good idea. As for the file sources, maybe we should have a size limit for what files we include in the resolved manifest, because that file is going to be in the final image, so it shouldn't be too large. |
Hmm, we actually need the data in memory because we're constructing a gvariant with it, in order to make the extra data be part of the commit in the local flatpak ostree repo for use at deploy time. It will be hard to change that. |
What's the status of this? Should we avoid using large extra-data sources? If so, then what size should be the upper limit? It would be nice to have extra-data guidelines somewhere? |
When downloading an asset through the "extra data" mechanism, its contents are all downloaded in memory (see
flatpak_load_http_uri()
incommon/flatpak-utils.c
). This can be problematic for large downloads (Unity3D is >2gb).This can also be problematic for
file
sources, since there may be two full copies of the contents in memory, one of them base-64 encoded. Seeflatpak/builder/builder-source-file.c
Lines 392 to 409 in b00b8b1
The text was updated successfully, but these errors were encountered: