eelab <[email protected]> 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 <[email protected]>
#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

Reply via email to