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

Re: vim slow on HP-UX 11.31

Expand Messages
  • eelab
    Thank you all for the tips - see the (ugly) solution below. Unfortunately installing package from http://hpux.connect.org.uk is not an option - and as it
    Message 1 of 6 , Dec 18, 2012
    • 0 Attachment
      Thank you all for the tips - see the (ugly) solution below.

      Unfortunately installing package from http://hpux.connect.org.uk is not an option - and as it turned out (see below) it wouldn't help anyway.

      I tried the other tip to compile vim for profiling but I got strange errors which nor I nor Google had any idea what to do with:

      gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -pg -g -DWE_ARE_PROFILING -o objects/eval.o eval.c
      /var/tmp//ccVmJ1Zu.s: Assembler messages:
      /var/tmp//ccVmJ1Zu.s:107302: Error: `mov' does not fit into MMB template
      *** Error exit code 1

      Finally I decided to try to track down the slowness by commenting out parts in the source code and try when it gets fast.

      Shortly, it turned out that the regular check for user interrupt (ctrl-C) during text search is extremely slow on this HPUX box for some reason.

      I didn't go further and just hacked that line_breakcheck() checks for user interruption after 10000 calls instead of the default 32. Not really nice, but works.

      misc1.c:

      // by balee >> not that often please
      #undef BREAKCHECK_SKIP
      #define BREAKCHECK_SKIP 5000
      // <<

      static int breakcheck_count = 0;

      void
      line_breakcheck()
      {
      if (++breakcheck_count >= BREAKCHECK_SKIP)
      {
      breakcheck_count = 0;
      ui_breakcheck();
      }
      }

      --
      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Ă©
      ... It looks like something wrong with your gcc compiler. In vim/src/Makefile, I see this: ### (2) HP-UX with a non-ANSI cc, use the c89 ANSI compiler ### The
      Message 2 of 6 , Dec 18, 2012
      • 0 Attachment
        eelab <balazs.ugron@...> wrote:

        > Thank you all for the tips - see the (ugly) solution below.
        >
        > Unfortunately installing package from http://hpux.connect.org.uk is not an option - and as it turned out (see below) it wouldn't help anyway.
        >
        > I tried the other tip to compile vim for profiling but I got strange errors which nor I nor Google had any idea what to do with:
        >
        > gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -pg -g -DWE_ARE_PROFILING -o objects/eval.o eval.c
        > /var/tmp//ccVmJ1Zu.s: Assembler messages:
        > /var/tmp//ccVmJ1Zu.s:107302: Error: `mov' does not fit into MMB template
        > *** Error exit code 1

        It looks like something wrong with your gcc compiler.

        In vim/src/Makefile, I see this:

        ### (2) HP-UX with a non-ANSI cc, use the c89 ANSI compiler
        ### The first probably works on all systems
        ### The second should work a bit better on newer systems
        ### The third should work a bit better on HPUX 11.11
        ### Information provided by: Richard Allen <ra@...>
        #CC = c89 -D_HPUX_SOURCE
        #CC = c89 -O +Onolimit +ESlit -D_HPUX_SOURCE
        #CC = c89 -O +Onolimit +ESlit +e -D_HPUX_SOURCE

        So you could perhaps try to use the c89 compiler on HPUX
        instead of gcc?

        $ cd vim/src
        $ rm auto/config.cache
        $ CC=c89 ./configure --with-features=huge --enable=gui=no
        $ make


        > Finally I decided to try to track down the slowness by commenting out parts in the source code and try when it gets fast.
        >
        > Shortly, it turned out that the regular check for user interrupt (ctrl-C) during text search is extremely slow on this HPUX box for some reason.
        >
        > I didn't go further and just hacked that line_breakcheck() checks for user interruption after 10000 calls instead of the default 32. Not really nice, but works.
        >
        > misc1.c:
        >
        > // by balee >> not that often please
        > #undef BREAKCHECK_SKIP
        > #define BREAKCHECK_SKIP 5000
        > // <<
        >
        > static int breakcheck_count = 0;
        >
        > void
        > line_breakcheck()
        > {
        > if (++breakcheck_count >= BREAKCHECK_SKIP)
        > {
        > breakcheck_count = 0;
        > ui_breakcheck();
        > }
        > }

        The function ui_breakcheck() looks like this in ui.c:

        359 void
        360 ui_breakcheck()
        361 {
        362 #ifdef FEAT_GUI
        363 if (gui.in_use)
        364 gui_mch_update();
        365 else
        366 #endif
        367 mch_breakcheck();
        368 }
        369

        This begs the question: did you enable FEAT_GUI?
        (probably not, judging from your above compilation options)

        Can you compare speed with and without FEAT_GUI?

        It would be interesting to find why ui_breakcheck() is slow.

        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
      • eelab
        On Tuesday, December 18, 2012 9:40:31 PM UTC+1, Dominique Pelle wrote: [...] ... Unfortunately I don t seem to have c89 installed (and can t get). [...] ...
        Message 3 of 6 , Dec 19, 2012
        • 0 Attachment
          On Tuesday, December 18, 2012 9:40:31 PM UTC+1, Dominique Pelle wrote:

          [...]

          > So you could perhaps try to use the c89 compiler on HPUX
          > instead of gcc?

          Unfortunately I don't seem to have c89 installed (and can't get).

          [...]

          > The function ui_breakcheck() looks like this in ui.c:
          >
          > 359 void
          > 360 ui_breakcheck()
          > 361 {
          > 362 #ifdef FEAT_GUI
          > 363 if (gui.in_use)
          > 364 gui_mch_update();
          > 365 else
          > 366 #endif
          > 367 mch_breakcheck();
          > 368 }
          > 369
          >
          > This begs the question: did you enable FEAT_GUI?
          > (probably not, judging from your above compilation options)

          No, I disabled gui option.
          Actually, it was the lowest level I checked, mch_breakcheck() was called.


          Best,
          Balazs

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