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

RE: Too many instances of vim?

Expand Messages
  • John Beckett
    ... In addition to what Ben said, is the network in use at all during this? For example, are the files Vim is working on accessed over a network, or (if
    Message 1 of 6 , Jun 1, 2012
    • 0 Attachment
      Shawn wrote:
      > I have used vim for several years now, but recently vim has
      > become painfully slow when it writes to disk. I am checking
      > into other possibilities, but one reason for this (in my
      > mind) might be that I have too many instances of vim up at
      > the same time. I have 48 GB of memory, so I don't think that
      > it is a memory issue, and my files are relatively small (~500
      > lines), so I am wondering if there is some central vim
      > manager that gets overworked if I keep pulling up vim
      > instances and not closing the others. Does this make sense?
      > If so, is there anything I can do about it other than closing
      > the files that I am keeping up? If not, any other ideas as
      > to why it might be so slow? I just saved a 650 line file, it
      > took 34 seconds.

      In addition to what Ben said, is the network in use at all
      during this? For example, are the files Vim is working on
      accessed over a network, or (if Windows) is your profile
      or home directory accessed over the network?

      Possibly you have some plugin that is doing silly things? Use
      :scriptnames to see what is loaded, and temporarily remove
      anything not essential. If possible, start Vim like this:

      vim -N -u NONE -i NONE (files)

      Or use gvim in above. If it is now fast, one of your plugins is
      responsible. One plugin I know of that shares data between
      instances is mru.vim. I have never seen it cause a slowdown, but
      I suppose if you had hundreds of Vim instances it might.

      BTW using gvim with tab pages is often better than multiple
      instances.

      John

      --
      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
    • Dominique Pellé
      ... I m not sure what s the root cause for slow writes here, but one possibility could be that fsync() is slow on your file system. ... Read :help fsync to
      Message 2 of 6 , Jun 1, 2012
      • 0 Attachment
        Shawn <spacephys@...> wrote:

        > Hello,
        >
        > I have used vim for several years now, but recently vim has become
        > painfully slow when it writes to disk.  I am checking into other
        > possibilities, but one reason for this (in my mind) might be that I
        > have too many instances of vim up at the same time.  I have 48 GB of
        > memory, so I don't think that it is a memory issue, and my files are
        > relatively small (~500 lines), so I am wondering if there is some
        > central vim manager that gets overworked if I keep pulling up vim
        > instances and not closing the others.  Does this make sense?  If so,
        > is there anything I can do about it other than closing the files that
        > I am keeping up?  If not, any other ideas as to why it might be so
        > slow?  I just saved a 650 line file, it took 34 seconds.

        I'm not sure what's the root cause for slow writes here, but one
        possibility could be that fsync() is slow on your file system.
        If so, doing this will help:

        :set nofsync

        Read ":help fsync" to be aware of the possible drawbacks in case
        of system crash.

        Personally, I use ":set nofsync" on my laptop to avoid spinning
        the disk whenever I write to file. I consider Linux reliable enough
        that I can afford delaying the write. My ~/.vimrc contains:

        if exists('+fsync') | set nofsync | endif

        Regards
        -- Dominique

        --
        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
      • Shawn
        Thanks to everyone, your inputs were all good possibilities. It turns out that Ben s suggestion to test the plugins was the one I needed. When I stopped using
        Message 3 of 6 , Jun 2, 2012
        • 0 Attachment
          Thanks to everyone, your inputs were all good possibilities. It turns
          out that Ben's suggestion to test the plugins was the one I needed.
          When I stopped using one of my python plugins everything started
          working as expected.

          -shawn

          On Jun 1, 10:16 pm, Dominique Pellé <dominique.pe...@...> wrote:
          > Shawn <spacep...@...> wrote:
          > > Hello,
          >
          > > I have used vim for several years now, but recently vim has become
          > > painfully slow when it writes to disk.  I am checking into other
          > > possibilities, but one reason for this (in my mind) might be that I
          > > have too many instances of vim up at the same time.  I have 48 GB of
          > > memory, so I don't think that it is a memory issue, and my files are
          > > relatively small (~500 lines), so I am wondering if there is some
          > > central vim manager that gets overworked if I keep pulling up vim
          > > instances and not closing the others.  Does this make sense?  If so,
          > > is there anything I can do about it other than closing the files that
          > > I am keeping up?  If not, any other ideas as to why it might be so
          > > slow?  I just saved a 650 line file, it took 34 seconds.
          >
          > I'm not sure what's the root cause for slow writes here, but one
          > possibility could be that fsync() is slow on your file system.
          > If so, doing this will help:
          >
          >    :set nofsync
          >
          > Read ":help fsync" to be aware of the possible drawbacks in case
          > of system crash.
          >
          > Personally, I use ":set nofsync" on my laptop to avoid spinning
          > the disk whenever I write to file. I consider Linux reliable enough
          > that I can afford delaying the write. My ~/.vimrc contains:
          >
          > if exists('+fsync') | set nofsync | endif
          >
          > Regards
          > -- Dominique

          --
          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
        Your message has been successfully submitted and would be delivered to recipients shortly.