Dropping lots of files on iTerm2 takes minutes to render
- iTerm2 version: Build 3.0.9
- OS version: macOS Sierra 10.12 (16A323)
- com.googlecode.iterm2.plist here (drag-drop from finder into this window)
- iTerm2-sample.txt
Detailed steps to reproduce the problem:
- Drag a lot of files onto an iTerm window, more than 500
- Wait
What happened:
I waited a long time while all the paths were pasted into the iTerm window. It runs quickly at first, and then it slows down, and slows down some more, until it crawls to a halt and the spinning beachball appears. You think the app has crashed, but if you look at it it is still making progress, maybe one new path per 20s or so.
Without knowing anything about how this works I think there's something with a quadratic complexity with regards to line length involved.
I hope the sample I've attached is helpful, I made it by dropping 300 files onto iTerm and pressed sample once it had noticeably slowed down.
What should have happened:
Dropping 1000 files onto iTerm2 should take 10 times as long as dropping 100 files, but now it's more like 100 times.
You may ask why anyone would want to drop hundreds of files on a terminal, so here's my use case: I work with photos in Lightroom, but I have a workflow of command line tools that I use to work with EXIF data because Lightroom can't do everything. I integrate Lightroom with my tools my selecting the photos in Lightroom and drag them onto iTerm to pass them as arguments to my tools.