Re: Cream unusably slow for some Vim scripts (e.g. TOhtml)
Cream is a free, easy-to-use configuration of the Vim text editor
Brought to you by:
digitect
From: BG - B. A. <BAr...@dy...> - 2005-12-28 20:14:31
|
On Wed, 2005-12-28 at 15:09 -0400, BG - Ben Armstrong wrote: > If we could defeat most or all Cream autocmds during this expensive > operation, only re-enabling them (and triggering them) when we are all > done, the performance could be greatly improved. Taking a cue from our earlier performance problem report and your suggestions about what to try, I devised a manual workaround: ^O:set eventignore=all ^O:TOhtml ^O:set eventignore= Then, to retrigger the BufEnter autocmds (e.g. filetype detection/syntax highlighting,) I had to leave the newly created html output buffer and re-enter it. This time, the TOhtml conversion only took 25 seconds. Re-measuring the same test in gvim, but without the set eventignore=all, it took 27 seconds, so I must have made an error (or my test environment wasn't "clean") the first time. Neat trick. But it needs packaging. I'd hate to have to write a Cream wrapper per expensive Vim function, but that's what it's looking like to me, with my limited Vim skills. By the way, I tried disabling autocmds one group at a time: autocmd! BufEnter *, autocmd! BufWinEnter *, etc. to narrow it down to a specific group that was causing the most trouble, but I never did find the culprit. (I probably wasn't patient enough and gave up too early -- there are an awful lot of autocmds!) Ben |