On Sun, Aug 16, 2009 at 6:44 PM, googler <[email protected]> wrote:

>
>
> Why such a huge difference in the time taken by two methods? Any
> comments? Any way I could have made things faster in the vim method?
>

I ran into a similar problem recently when I accidentally did effectively
the reverse of what you're trying to do -- I turned a multi-thousand line
file into one long line. And it took forever.

In my case, ignoring my error, the slowdown was due to Vim maintaining undo
data. The memory used by Vim grew to over 500MB and the swap file grew
similarly. I'm assuming Vim was writing the line(s) changed to the swap file
after each change. In my case that line kept getting longer and longer,
meaning more and more data that had to be written. In your case it would
start off huge and probably get smaller/faster as it made more changes.

As others have stated, Vim might not be the best tool for this particular
job, but if you want to use it you might trying turning off undo and backup.

  -- Jay

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to