Skip to content
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

Change PKGMAN_DownloadURL to download into a file #59

Open
fingolfin opened this issue Nov 7, 2020 · 1 comment
Open

Change PKGMAN_DownloadURL to download into a file #59

fingolfin opened this issue Nov 7, 2020 · 1 comment
Labels
feature request New feature

Comments

@fingolfin
Copy link
Member

I've been looking at commit e379fa8 which works around a double-compression bug with latest GAP development versions (BTW, the code now references GAP PR #4110 but that one has been superseded by PR #4128).

And I wonder: Why do you actually do it that way: why read the data all into memory, then write it out? How about instead changing PKGMAN_DownloadURL to directly download into a (temporary) file, and then put the full path of that file into the result record? This is trivial with both curl and wget; with curlInterface, if it isn't already possible, it should be easy to add (and at worst, one could still fall back to using FileString there).

That way you sidestep the double compression issue, and the result is likely more efficient as well (in terms of memory usage and raw throughput).

@mtorpey
Copy link
Collaborator

mtorpey commented Nov 9, 2020

Thanks for the suggestion – this occurred to me before, but as you say, I don't think it's currently possible in curlInterface, so I went for this workaround instead.

Your suggestion is probably better, so we should do this at some point!

@mtorpey mtorpey added the feature request New feature label May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature
Projects
None yet
Development

No branches or pull requests

2 participants