1

Re: Replace is painfully slow and loses data

When performing a wide search/replace operation such as :%s/\t/    /g to replace tabs with four spaces in a 2000-line file, I get three problems:
* the operation is incredibly slow: 43 seconds on my machine (a quad-core with 8 GB of RAM) whereas the same operation in vim takes a split second
* undoing is almost equally slow: 32 seconds
* undoing often stops at random locations, with no obvious way to complete the undo sequence (further pressing the U key does nothing).

This is Microsoft Visual Studio 2008 Version 9.0.30729.1 SP on Vista64, with ViEmu evaluation copy 2.2.9. All third-party plugins such as VAX were disabled for this test.

2

Re: Replace is painfully slow and loses data

Sam, apologies for the delay in answering. Indeed, ViEmu's :s can be slow for heavy-duty operation. It's mostly due to the many layers the operations go through, where vim does the modifications directly, ViEmu has to go through layers of APIs for operations, mark-bookkeeping, undo-stack, Intellisense-integration, etc... which makes it a poor case for speed.

The undoing being slow is probably due to having each small operation be done individually.

In any case, I am taking note and I will look into it as soon as I can, to try and see if there is anything obvious which is making it so embarrassingly slow, and get back to you.

Thanks for the feedback,

  -- Jon

3

Re: Replace is painfully slow and loses data

Ditto for me on this issue.  I was going to post a topic about it, but it appears that at least one other user is experiencing the slow performance.

I notice that the substitution command takes one complete core of CPU (13% for an 8-core is one core) and causes massive fluctuation in both physical and virtual memory allocation (rapid swings by 100MB or more).  Also, by the time that my operation completes, there are about 5 million page faults logged by devenv.exe.

I am running VS2005 v8.0.50727.762 with Codekana installed as well.

This is a very frustrating issue.

4

Re: Replace is painfully slow and loses data

We're now trying to improve the performance of ViEmu/VS2010, and hopefully we will be able to apply some of the lessons to the ViEmu/VS "Classic" version.