Closed jdtsmith closed 11 months ago
This speeds up draw-tree by >25x by eliminating most calls to current-column
. As mentioned in the doc of that function, current-column
gets quite slow for long lines, and we only need it rarely when there is no room for a branch.
Thanks! Merged. It would be even better if the commit message are written in the right format though.
This simple fixes makes calls to
(current-column)
happen only when needed duringdraw-tree
-- when there is no room for a new branch. Sincecurrent-column
gets quite slow on long lines, calling it unnecessarily on each node in the tree leads to major (quadratically bad) slowdown.