I’ve struggled for a while with slow pasting of text into iterm2. Last week, I tried the stock macOS Terminal app, but found the same issue.

It turns out this is not related to the terminal client (iTerm 2 has options to slow down paste for compatibility), or event to zsh (ohmyzsh had a bug related to this a few years ago), but to irb.

To work around the slow pasting of multiline text into irb disable multiline