astrand / xclip

Command line interface to the X11 clipboard
GNU General Public License v2.0
1.04k stars 75 forks source link

Pastes are buffered, requiring much more memory. #99

Open hackerb9 opened 3 years ago

hackerb9 commented 3 years ago

Perhaps there should be an option to either have the output flushed after each INCR chunk or even completely unbuffered.

While not a frequent occurrence, there is no reason to limit X selection transfers to the size of RAM on the machine. And, it is certainly bad behaviour to potentially consume all of RAM before writing a single byte.

In the extreme, a user should be able to do: machine1$ xclip < /dev/sda machine2$ xclip > harddrive.bkup

and have it work no matter how large the harddrive is compared to the size of RAM.