Hi, On Sun, Mar 10, 2019 at 4:23 PM Yury Krivopalov <[email protected]> wrote: > > Hello, > > I found a problem while using QuickFix list with a mounted network > folder. It becomes very slow, because Vim performs stat() request for > _each_ file from the list during it's initialization. >
When populating the quickfix list, the files in the quickfix entries are loaded into buffers. As part of loading the files, stat() call is made to get information about the file. The buffer number is stored as part of the quickfix entry. > > Problem can be easily reproduced while running Vim under strace and > performing :cgetfile command (I can provide more details if needed). > > Environment: > VIM - Vi IMproved 8.1 (2018 May 18, compiled Mar 8 2019 22:29:27) > ArchLinux > > Backtrace for this stat() call: > ``` > #0 0x00007faeced7fd99 in __xstat64 () at /usr/lib/libc.so.6 > #1 0x0000556baf141df8 in buflist_new (ffname_arg=0x556baf8b1790 "a", > sfname_arg=0x0, lnum=0, flags=16) at buffer.c:1898 > #2 0x0000556baf2880e9 in qf_get_fnum (qi=0x556baf4493e0 <ql_info>, qf_idx=1, > directory=0x0, fname=0x556baf8b1790 "a") at quickfix.c:2319 > #3 0x0000556baf287821 in qf_add_entry > (qi=0x556baf4493e0 <ql_info>, qf_idx=1, dir=0x0, fname=0x556baf8b1790 > "a", module=0x556baf8b1380 "", bufnum=0, mesg=0x556baf8b0f70 " <<lineA>> > lineA", lnum=1, col=0, vis_col=0, pattern=0x556baf905c50 "", nr=-1, type=0, > valid=1) at quickfix.c:2035 > #4 0x0000556baf286fd1 in qf_init_ext > (qi=0x556baf4493e0 <ql_info>, qf_idx=1, efile=0x556baf8d72c0 "qf", > buf=0x556baf8aa190, tv=0x0, errorformat=0x556baf8ad070 "%*[^\"]\"%f\"%*\\D%l: > %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only > once,%-G%f:%l: for each function it appears in.),%-GIn file included from > %f:%l:%c:,%-GIn file included from "..., newlist=1, lnumfirst=0, lnumlast=0, > qf_title=0x556baf449900 <qftitle_str> ":cg qf", enc=0x556baf8addc0 "") at > quickfix.c:1687 > #5 0x0000556baf287211 in qf_init > (wp=0x0, efile=0x556baf8d72c0 "qf", errorformat=0x556baf8ad070 > "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared > identifier is reported only once,%-G%f:%l: for each function it appears > in.),%-GIn file included from %f:%l:%c:,%-GIn file included from "..., > newlist=1, qf_title=0x556baf449900 <qftitle_str> ":cg qf", enc=0x556baf8addc0 > "") at quickfix.c:1767 > ... > ``` > > This problem makes it almost impossible to use QuickFix list in my > environment. All what I need is a buffer that displays the list of > files with line numbers and possibility to open these files, but > without implicit stat() requests to all these files. > > Could you please advice, is it possible to workaround this problem? Or > The quickfix feature cannot be used without loading the files into buffers. > > maybe I should use something else instead of QuickFix, maybe some > third-party plugin? > You can create a buffer with the list of file names and line numbers. You can then use gF to open the files and jump to the line. Regards, Yegappan -- -- You received this message from the "vim_dev" 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
