Wednesday, June 2, 2010

Re: Progress indicator for :TOhtml command

On 02/06/2010 9:55 AM, Ben Fritz wrote:
>
> On Jun 2, 8:43 am, Ben Fritz<fritzophre...@gmail.com> wrote:
>
>> On Jun 2, 3:13 am, "Christian Brabandt"<cbli...@256bit.org> wrote:
>>
>>
>>> On Wed, June 2, 2010 1:04 am, Benjamin Fritz wrote:
>>>
>>>> - Added a second progress bar for the attributes processing (previously I
>>>> was
>>>> doing this with a %d/%d printf).
>>>> I also removed the "redrawstatus" commands. They did not seem to be
>>>> necessary,
>>>> and only served to increase the processing time. Did you have a particular
>>>> reason to include them?
>>>>
>>
>>> Yes. I can't see the progressbar otherwise. It is not updating for me. So
>>> I suggest, enabling it again.
>>>
>> Interesting. Is this true, even with the progress bar on the top
>> window as in the latest version? If it is on the bottom, the screen
>> clears again for a redraw immediately after the bottom status line is
>> drawn, making it very hard to see the progress bar...which is why I
>> put it on the top.
>>
>>
> This got me thinking...so tried the following:
>
> gvim -N -u NONE -i NONE
> filetype indent plugin on
> syntax on
> :help intro
> :source $HOME/vimfiles/syntax/2html.vim
>
> I do not see the progress bars! The status lines never get drawn at
> all (and the conversion is lightning fast). It appears I have
> something in my Vim setup that slows things down enough, or redraws
> the window, or something, that causes the status lines to appear when
> normally they would not.
>
> Any ideas? I don't see anything suspicious in my usual Buf/Win Enter/
> Leave autocmds:
>
>
...

I have a plugin (WhatsMissing) which flips repeatedly back and forth
between different buffers.
To address my issues with slow performance I changed the function to do
this:

let l:old_eventignore = &eventignore
set eventignore+=BufNewFile,BufReadPre,BufRead,BufReadPost,BufReadCmd
set eventignore+=BufFilePre,BufFilePost,FileReadPre,FileReadPost
set
eventignore+=FileReadCmd,FilterReadPre,FilterReadPost,FileType,Syntax
set eventignore+=StdinReadPre,StdinReadPost,BufWrite,BufWritePre
set eventignore+=BufWritePost,BufWriteCmd,FileWritePre,FileWritePost
set
eventignore+=FileWriteCmd,FileAppendPre,FileAppendPost,FileAppendCmd
set eventignore+=FilterWritePre,FilterWritePost,FileChangedShell
set eventignore+=FileChangedRO,FocusGained,FocusLost,FuncUndefined
set eventignore+=CursorHold,BufEnter,BufLeave,BufWinEnter,BufWinLeave
set eventignore+=BufUnload,BufHidden,BufNew,BufAdd,BufCreate,BufDelete
set eventignore+=BufWipeout,WinEnter,WinLeave,CmdwinEnter,CmdwinLeave
set eventignore+=GUIEnter,VimEnter,VimLeavePre,VimLeave,EncodingChanged
set eventignore+=FileEncoding,RemoteReply,TermChanged,TermResponse,User

something ...

Then restored the &eventignore when complete.

The performance was dramatic.

Perhaps you could put that in yours and see what you get.

Dave

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

No comments: