AnsiEsc bottleneck on large files
mortang2410 opened this issue · comments
Try running journalctl
with let g:vimpager.ansiesc = 0
and without it (assuming you're using systemd
). Or view any really big text file.
vim with AnsiEsc would choke and wait until AnsiEsc finishes. While vim alone is fast enough to read through, like, 1521561 lines of text in a few seconds.
This might seem like a stretch goal, and this scenario isn't always common, but maybe AnsiEsc should be turned off after a set number of lines to prevent this scenario.
What you suggest is a simple enough fix, I'll try to do it shortly.
Fixed in master, see above commit.
I chose 1250 lines for the cutoff because it's roughly 3 seconds on modern hardware.