blob: 33d736afdd47433f8788450c6555bf44e5021a67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
Currently, git-annex takes a very lazy approch to displaying
progress into. It just lets rsync or whatever display the progress
for it, in the terminal.
Something better is needed for the [[webapp]]. There needs to be a
way for the web app to know what the current progress is of all transfers.
This is one of those potentially hidden but time consuming problems.
## downloads
* Watch temp file as it's coming in and use its size.
This is the only option for some special remotes (ie, non-rsync).
Can either poll every .5 seconds or so to check file size, or
could use inotify. Implemented.
* Feed rsync output into a parser and parse out a progress value. Ugly,
failure prone, but potentially the least CPU-expensive option.
* Use librsync. Note: It's not wire-compatiable with the actual rsync
command.
* Set up a FIFO, have rsync read from or write to that, and the FIFO
feeder/reader then can update the transfer info. Generic enough to
work for most (all?) special remotes, but also the most expensive option,
involving another copy through memory of the whole file contents.
## uploads
Cannot use temp file, as we're not receiving it. Rsync progress parser,
librsync, and FIFO all work.
|