Bram Moolenaar wrote: > Lech Lorens wrote: > >> On 10-Nov-2009 Dominique Pellé <[email protected]> wrote: >> > >> > > After inserting '(' with the official syntax highlighting file I need to >> > > wait a few seconds (sic!) before the screen is updated and "i =" >> > > appears. >> > >> > On my machine, I had to wait 1 minute and 50 seconds (!) before I >> > could see "i = " (and Vim was using 100% of the CPU during that >> > time). That's with Vim-7.2.284 built with -O0 on a Core-2, 1.7Ghz. >> >> Bram, do you have an opinion on the subject? > > I have put a remark in the todo list, I'll look into it later. > > Did you try profiling to find out where the time is wasted?
I profiled with gprof using Vim-7.2.293 built with: -O0 -g -pg -DWE_ARE_PROFILING ... and executed the steps described earlier by Lech: $ vim -p eval.c eval.c eval.c :tabdo set fdm=syntax fdc=5 number :normal 1gt :820 :normal zO Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls s/call s/call name 72.81 49.62 49.62 106860477 0.00 0.00 in_id_list 7.55 54.76 5.14 5585619 0.00 0.00 syn_current_attr 3.19 56.94 2.17 8395304 0.00 0.00 regmatch 2.60 58.70 1.77 270449 0.00 0.00 syn_stack_find_entry 2.44 60.37 1.66 533472 0.00 0.00 syntax_start 1.48 61.38 1.01 114389042 0.00 0.00 utfc_ptr2len 1.26 62.23 0.86 60053856 0.00 0.00 regnext 0.97 62.90 0.66 6124658 0.00 0.00 vim_strchr 0.44 63.20 0.30 6391651 0.00 0.00 vim_regexec_both 0.40 63.47 0.28 12652530 0.00 0.00 vim_iswordc_buf 0.37 63.72 0.25 43505784 0.00 0.00 utf_ptr2char ... I put the full gprof profiling result at: http://dominique.pelle.free.fr/prof-vim-7.2.293.txt.gz Cheers -- Dominique --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
