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

86240Re: vim7 chokes on simple text file

Expand Messages
  • Tony Mechelynck
    Jan 6, 2008
      Daniel Fetchinson wrote:
      Tony Mechelynck wrote:
      >> Works for me (even with js syntax highlighting) on Linux with gvim 7.1.203
      >> for
      >> GTK2/Gnome.


      VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan 5 2008 06:45:02)
      Included patches: 1-203
      Modified by Bram Moolenaar (filename-completion)
      Compiled by antoine.mechelynck@...
      Huge version with GTK2-GNOME GUI. Features included (+) or not (-):


      > I have VIM 7.1 (2007 May 12, compiled Oct 4 2007 10:45:32)
      > Included patches: 1-135
      > Modified by <bugzilla@...>
      > Also on linux.
      >> Moving around (e.g. using j k <End> etc.) gives me no problem. I
      >> didn't try making changes in the long lines.
      >> - You say "vim chokes". What are the exact symptoms you got?
      > CPU usage shootes up to 100% for an extended period of time (5-10
      > seconds) and vim becomes unresponsive in the meantime.
      > These are the steps which are consistently reproducing the issue:
      > 1. open the file

      works for me

      > 2. gg
      > 2. move a couple of line down until the last line starting with
      > (function(........

      hit G -- gvim hangs for a time but eventually gets there. Going back (gg) and
      forward again (G) give further temporary hangs

      > 3. move right until you hit the first curly bracket {

      cursor moves immediately but stops blinking for a time. Then blinking resumes
      but cursor doesn't respond (or only extremely sluggishly) to the cursor
      movement keys

      > 4. CPU usage shoots up to 100% and vim becomes unresponsive

      I get gvim steadily using between 40% and 60% of my total CPU time, which is

      > 5. after 5-10 seconds vim comes back live
      > Maybe "choking" is too strong a word :)
      > Vim doesn't actually hang just takes a little time out.

      I guess Vim isn't optimized for the handling of 27511-character lines.

      I tried:

      :filetype indent off

      (reformat the whole file). It went slowly, but after that the "temporary
      hangs" disappeared completely. So I tried

      :filetype indent on

      which added enormous lots of tabs, especially near the end. I had to undo.

      The (first) reformat apparently adds linebreaks only where there are spaces,
      which isn't ideal for such an uglily-written file. I can only say that (as
      someone who, 30 or 40 years ago, often had to take up COBOL programs written
      by other people and make them "work right") I totally disapprove with the
      "coding style" of whoever wrote that JS program.

      Best regards,
      Mencken and Nathan's Ninth Law of The Average American:
      The quality of a champagne is judged by the amount of noise the
      cork makes when it is popped.

      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 13 messages in this topic