Hi Ben!

On Di, 15 Mai 2012, Ben Fritz wrote:
> Since the error only occurs if 'backup' and 'writebackup' are both 
> off, maybe we could only do the "dry run" conversion in this 
> situation? I.e., if either 'backup' or 'writebackup' are set, do what 
> Vim has always done; but if neither are set, do the extra check first. 
> We could even put a nice notice in :help 'writebackup' saying "if this 
> option is off, writing the file will take longer due to extra safety 
> checks" to discourage turning it off in the first place.

I think this is a good compromise¹. First off all, a successful write 
should have priority, so one needs to be very cautious, in case an 
encoding from 'enc' to 'fenc' needs to be done.

That small write penalty should be ok, since it is only noticeable when 
writing larger files (e.g. files with a size of several megabytes) and 
although I usually use Vim with large csv files of several hundred 
megabytes, I only seldom save files with that size, so I think editing 
so large files is not done by the majority of vim users.

I have done some more statistics and in the standard case (when 
writebackup is set), writing is as fast as usually, while only when 
'writebackup' is turned off, write performance is impacted.


¹) updated patch at https://gist.github.com/2704019

regards,
Christian
-- 
Glück ist ein Stuhl, der plötzlich dasteht, wenn man sich zwischen
zwei andere setzen will.
                -- George Bernard Shaw

-- 
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

Reply via email to