git-annex/doc/design/assistant/progressbars.mdwn
2012-08-28 14:04:28 -04:00

28 lines
1.2 KiB
Markdown

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.