Thursday, September 11, 2014

Re: sorted file takes much longer to load

On Friday, September 12, 2014 2:55:17 AM UTC+12, Ben Fritz wrote:

> I have an idea:
>
> If the unsorted file has "bad" characters early in the file, then the early encodings in 'fileencodings' will fail quickly.
>
> But if the sorted file places those bad characters late in the file, then the conversion may need to read most of the file before it fails, repeated for possibly multiple encodings.

Yes, something like this is happening. After
:g/[^ -~]/move 1

The file then loads quickly. If those 13 lines are moved to the end of the file
the file takes nearly 3 minutes to load.

However, using

vim -u NONE ++enc=latin1 file.txt

or

vim -u NONE -c "set fencs=latin1" file.txt

or setting fencs=latin1 in my .vimrc do not avoid the slowness. Starting vim with just -u NONE then

:e ++enc=latin1 file.txt

does. I don't understand.

Regards, John Little

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: