1

Re: MS Word focus/insert-to-command-mode slow for long documents

Jon,

I noticed two behaviors that both show themselves only on long (20+ page) Word documents.  ViEmu eats up processor time (I see the hourglass) when...:

* Alt-Tabbing between MS Word and another application, which makes flipping back and forth really tedious
* Switching from Insert mode to Command mode
* When hitting 'u' to undo the last action

I know from my last performance-related forum post that the Word object model is a slow, nasty beast but I was hoping that you might have some tip to cut out some of this processing.  I'd break up this document into smaller documents but I need the table of contents functionality. 

Thanks again,

Brent.

2

Re: MS Word focus/insert-to-command-mode slow for long documents

I almost forgot.  This time I'm using ViEmu version 1.5.1 on Windows XP Professional with Microsoft Word 2003 SP3.

3

Re: MS Word focus/insert-to-command-mode slow for long documents

Judging by the fact that you didn't reply quickly, as you normally do, I suppose there isn't anything I can do to remedy my speed issue?

4

Re: MS Word focus/insert-to-command-mode slow for long documents

Apologies Brent, I've been overly busy lately and it's taking me longer to respond.

Indeed, ViEmu in Word can be very slow with large or otherwise "problematic" documents. There is not much that can't be done. This is due to Word's underlying object model, which ViEmu uses, and which is excruciatingly slow for even simple things like asking for the number of paragraphs (which ViEmu often has to do, as there are no notifications or other event triggers to know when the document has been updated!). ViEmu uses a quite complex caching system to try to minimize this, but the caching system is only efficient for simpler or smaller documents. This is not noticeable while typing (thanks to some internal ViEmu optimizations) or while moving around in normal mode, but it's most noticeable either when focus changes (ViEmu assumes the cache might be invalid now), or when switching from insert mode to normal mode or back.

I'd think that the table of contents might be the culprit in this case, but it might be something else.

Unfortunately, there is not much that I can do before Microsoft implements some better extensibility model (unlikely), or we all move to a better architected word processor (even more unlikely yet).

Best regards,

  Jon

5

Re: MS Word focus/insert-to-command-mode slow for long documents

admin wrote:

Unfortunately, there is not much that I can do before ... we all move to a better architected word processor

Are there any other word processors that you would possibly provide ViEmu for?  Perhaps OpenOffice?

6

Re: MS Word focus/insert-to-command-mode slow for long documents

Hello,

The comment about moving to another word processor was somewhat tongue-in-cheek... At least in principle, I don't really plan to implement other ViEmu editions. The reason is that the required effort is huge, and the economies of scale don't really kick in to make it worthwhile.

On the other hand, I seem to remember that someone had at least started implementing a vi input mode for the open source word processor AbiWord, although I don't know how functional it was.

Best regards,

  Jon

7

Re: MS Word focus/insert-to-command-mode slow for long documents

admin wrote:

The reason is that the required effort is huge, and the economies of scale don't really kick in to make it worthwhile.

I figured as much.  I was just wistfully dreaming of a work day in which I can write everything in vi mode, no matter what application I happen to be using at the time.  Maybe someday...

8

Re: MS Word focus/insert-to-command-mode slow for long documents

Brent, hopefully yes... but I think it will require a saner environment than Windows, which requires countless hacks for any integration. I do expect the future of computing holds all-encompassing-vi-editing as a possibility, when, unlike today, full separation of UI and logic is realized.

Cheers,

  -- Jon