On Sun, Jun 15, 2008 at 3:36 PM, misi <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> would like to use vim to edit large files (600mb). Unfortunatelly, it
> looks like opening such large files even on a Pentium 3.4Ghz with PATA
> disk takes quite some time (ubuntu, kernel 2.6.22-14). I know that vim
> creates some internal tree representation of the file, but I wonder if
> something could be tuned, so that such loading times decrease, even if
> memory usage would increase.
>
> I tried to open a 767.187.800 bytes file (I created this file by cat-
> ing all vim src files 100 times ) :
>
> time vim  -u ./.vimrc --noplugin  -c":q" ../all3.c
>
> the result is:
>
> real    0m17.670s
> user    0m15.457s
> sys     0m1.428s


Hmm you are lucky. Same command takes me 43 sec
on 700mb file, E2180 processor with 2GB RAM,
ubuntu feisty, kernel 2.6.26-rc5, and ul=-1 added to ./vimrc.


>
> the .vimrc contains only
>
> set noswapfile
>
> I profiled vim, and opening the same file I got the file below....
>
> So the question would be, is it possible to tune sthg. to open faster
> these files??
>
> Regards
> Misi
>
> below the gprof head
>
> XXXXX$ head -40 no_swap
>
> Flat profile:
>
> Each sample counts as 0.01 seconds.
>  %   cumulative   self              self     total
>  time   seconds   seconds    calls   s/call   s/call  name
>  46.12      1.96     1.96        1     1.96     4.22  readfile
>  23.53      2.96     1.00 31025600     0.00     0.00  ml_append_int
>  12.94      3.51     0.55 31025601     0.00     0.00  ml_updatechunk
>  8.24      3.86     0.35 31361959     0.00     0.00  ml_find_line
>  4.94      4.07     0.21 31025600     0.00     0.00  ml_append
>  0.47      4.09     0.02  1876672     0.00     0.00  mf_put
>  0.47      4.11     0.02  1655954     0.00     0.00  mf_find_hash
>  0.47      4.13     0.02  1655954     0.00     0.00  mf_get
>  0.47      4.15     0.02        1     0.02     0.02  ml_delete
>  0.47      4.17     0.02                             ml_setmarked
>  0.24      4.18     0.01  1876675     0.00     0.00  mf_ins_hash
>  0.24      4.19     0.01  1655955     0.00     0.00  mf_rem_hash
>  0.24      4.20     0.01  1655954     0.00     0.00  mf_rem_used
>  0.24      4.21     0.01   698266     0.00     0.00  ml_add_stack
>  0.24      4.22     0.01   441920     0.00     0.00  alloc
>  0.24      4.23     0.01   258689     0.00     0.00  mf_trans_del
>  0.24      4.24     0.01   258600     0.00     0.00  ml_lineadd
>  0.24      4.25     0.01                             vim_chdirfile
>  0.00      4.25     0.00  1876674     0.00     0.00  mf_ins_used
>  0.00      4.25     0.00   453656     0.00     0.00  lalloc
>  0.00      4.25     0.00   453591     0.00     0.00  vim_free
>  0.00      4.25     0.00   220720     0.00     0.00  mf_alloc_bhdr
>  0.00      4.25     0.00   220720     0.00     0.00  mf_free_bhdr
>  0.00      4.25     0.00   220720     0.00     0.00  mf_new
>  0.00      4.25     0.00   220720     0.00     0.00  mf_release
>  0.00      4.25     0.00   219851     0.00     0.00  ml_new_data
>  0.00      4.25     0.00    11709     0.00     0.00  RealWaitForChar
>  0.00      4.25     0.00    11709     0.00     0.00  mch_breakcheck
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui