You are not logged in.

#1 2006-07-27 09:38:54

Pajaro
Member
Registered: 2004-04-21
Posts: 884

SUGGESTION: download packages at once [solved]

When pacman downloads packages, it downloads them one by one. It means:
1 - Connect
2 - Identificate
3 - set dir
4 - Download

It does this for each file. even if the server is down, it will try to connect again to the same server for each file it has to download.

My suggestion is that instead of downloading file by file, have it to download all files at once, just one connection per server.

This would avoid the connect and identificate in many of the files. It also would make much more easier to cancel an upgrade with Ctrl + C, cause it would be one cancel per server, not one cancel per file per server (in case you use wget).

And, of course, it would speed up the downloads.

Offline

#2 2006-07-27 10:03:41

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: SUGGESTION: download packages at once [solved]

Sounds reasonable but you'll need a patch!

Offline

#3 2006-07-27 13:39:41

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: SUGGESTION: download packages at once [solved]

I checked pacman source code

If you don't use XFerCommand it connects once per server... at least the function that downloads the files has support for it... and the comments in the main file also say that... so pointless topic tongue

Offline

#4 2006-07-27 15:09:40

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: SUGGESTION: download packages at once [solved]

Shall I delete it then?

Offline

#5 2006-07-27 15:38:36

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: SUGGESTION: download packages at once [solved]

yes, please

Offline

#6 2006-07-27 18:15:24

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: SUGGESTION: download packages at once [solved]

If you use wget to download your packages, read the wget man pages. I think wget has an option to reuse existing connections. If so, you can just add this option to the XFerCommand and that will fix the problem.

Offline

#7 2006-07-27 19:35:56

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: SUGGESTION: download packages at once [solved]

I didn't find anything in the man pages about that.

Offline

#8 2006-07-27 22:13:11

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: SUGGESTION: download packages at once [solved]

Hmm... I just went trought the man pages and there doesn't seem to be any options. Sometime, when I use wget there's a "reusing existing connection" message. Maybe it depends on the server. You could try this switch combination:
-r -l0
From: http://marc.theaimsgroup.com/?l=wget&m= … 132185&w=2
it seems to be a work around.

Offline

#9 2006-07-28 05:30:06

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: SUGGESTION: download packages at once [solved]

-r: recursive
-l0: depth=0

The download function of pacman is programmed to check file by file. To apply a patch that uses single connection with wget (if wget supports it) the code should be cleaned a bit by putting the "check download" code in another function (before there was no need so it is was ok like it is right now), and there should be a way to specify in pacman.conf that your xfercommmand supports multiple files (%u single file, %U multiple files?)

Offline

Board footer

Powered by FluxBB