gnachman/iTerm2 — pull request #134 by jordanlewis (2013-07-15 02:10:54+00:00)
Title: Scrollback buffer performance improvment: Keep LineBlock's cached_numlines up to date

Previously, LineBlock's appendLine and dropLines methods would
invalidate its cache of the number of full lines that were in the block,
causing an expensive iteration through the entire block the next time
that information was necessary. This is unnecessary - instead, we can
update the cached_numlines value by examining the line that was just
added or dropped.

This improves the performance of `cat /usr/share/dict/words' on my
machine by about a quarter.