Loading ...
Sorry, an error occurred while loading the content.
 

Re: Slowdowns caused by bracket matching

Expand Messages
  • Bram Moolenaar
    ... Well, there are probably ways to make matchparen go faster, but you should still try to solve the problem in Macvim. The same behavior can happen with
    Message 1 of 8 , Nov 1, 2007
      Björn Winckler wrote:

      > > > 3. Ran Shark (sampling all threads) while frantically hitting keys on
      > > > the keyboard. Shark tells me that the CPU time is spent as follows:
      > > > WITH matchparen : Vim ~50% : Idle process ~25% : MacVim ~15%
      > > > WITHOUT matchparen: MacVim ~35% : Idle process ~30% : Vim ~20%
      >
      > I've found an even worse example: open mbyte.c line 1194, put cursor
      > on the '}', press 'i' and start typing. Argh! (To those of you who
      > don't dare trying...the "frame rate" goes down to something like 1
      > Hz.)
      >
      > I tried opening the same file in Carbon Vim and vim-cocoa. Carbon Vim
      > is awfully slow but better than MacVim, vim-cocoa on the other hand is
      > as slow as MacVim. Can anybody offer me an explanation as to what's
      > going on here? It is interesting to see that both MacVim and
      > vim-cocoa are so slow.
      >
      > I profiled vim-cocoa same way as I did MacVim and most time is spent
      > in regmatch() (~25%). Oh, and when profiling MacVim with this file
      > almost 90% of the processor time is spent inside the Vim process!
      >
      > Again, without matchparen enabled everything is just fine. I strongly
      > advice anybody running into performance problems to disable
      > matchparen. Bram: should I try to see if I can optimize Vim or is
      > there something else that can be done to make matchparen behave?

      Well, there are probably ways to make matchparen go faster, but you
      should still try to solve the problem in Macvim. The same behavior can
      happen with another plugin.

      --
      hundred-and-one symptoms of being an internet addict:
      77. The phone company asks you to test drive their new PBX system

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.