I have 252KB in the paste buffer.
$ pbpaste | wc
8064 44352 258108
When I paste this into a fresh mosh session, I see mosh-client's resident set size balloon to 5GB.
I just tried reproducing this. On OS X 10.10 to an RPi2 running Raspbian, pasting the Mac's /etc/services (677KB) with command-V in Terminal, I saw Homebrew's 1.2.4 Mosh client bloat to 3GB of core (and later shrink to 121MB). When I tried this with my performance code in #531, though, mosh-client stays at 25MB. I don't know why; I don't think this code should have any positive effect on your problem. Could you try this code?
Confirmed the bug with the debian package 1.2.4a-1+b2.
I've pulled #531. Can either of you report whether this problem still exists?
Still a problem.
From a FreeBSD client running 126.96.36.199rc1 I saw my client bloat to 5+ GB and take about 45s CPU to transmit that same 677KB. Mosh's timeout message also appeared for most of that time.