Re: more on flushing; Aap: Copied; /usr/bin/scp -C -p

Bram Moolenaar <[email protected]> Sun, 18 Jan 2004 15:13:02 +0100
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Scott Harrison wrote:

> Also, output like what is listed below is being output in chunks
> (as opposed to being flushed line by line).

For an unknown reason your Python is buffering the output like it is
being written into a file, opposed to flushing each line when writing to
a terminal.  I'm afraid I can't guess why.

> And, with scp://, it appears to take 4 minutes to transfer
> 100 files (certainly not due to bandwidth).  Maybe the slow
> scp is something I need to investigate, but maybe you have an idea?

scp takes some time to establish a connection.  Currently Aap starts a
new scp command for each file, unless it can figure out something to
copy multiple files at a time (going to the same directory).

I don't know if there is a way to run scp once and somehow make it copy
several files.  We also need to check failure properly, this this may be
a bit complicated.

> When I say chunks, I mean 10+ lines at a time.

That's the normal way Aap avoids very long command lines.  Most shells
have a limit for the length of the line.  Aap currently splits up the
list in chunks of 20 files.

-- 
MORTICIAN:    What?
CUSTOMER:     Nothing -- here's your nine pence.
DEAD PERSON:  I'm not dead!
MORTICIAN:    Here -- he says he's not dead!
CUSTOMER:     Yes, he is.
DEAD PERSON:  I'm not!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn