On Wed, Apr 1, 2020 at 7:15 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
>
> Hi,
>
> I am using the built-in ccomplete#Complete omnifunc for tags-based
> completion. It works pretty well with a small or medium sized project.
> But on larger projects like Linux or U-Boot, the tags file is pretty big
> (~650k lines/70 for U-Boot and ~4.8 mil lines/630MB for Linux).
>
> On these projects, especially Linux, if I use ccomplete, completion
> takes a huge amount of time. And since the completion is synchronous,
> vim just freezes up for that time and I have to wait for the completion
> results to show up. On Linux the wait times can go more than a minute on
> my modest quad core 4th gen i7 and a SATA SSD.
>
> So, I intend to set aside some time and try to speed up the completion
> and make it asynchronous. I haven't read or written much vimscript so I
> don't expect it to be easy or quick. So before I do that, I'd like to
> know if anyone here attempted this before.
>
> If someone did succeed, could you please point me to the optimized
> version? If someone tried but failed, could you please let me know where
> you had trouble? Is it that the ctags format just not suitable for large
> projects? Is there some limitation with vim that makes it impossible? Is
> it something else entirely?
>
> --
> Regards,
> Pratyush Yadav
The Vim tags file is pretty large, but how is your tags file built? In
particular, is it case-fold-sorted? If your Vim is built with
+tag_binary (nowadays it always is, if yours isn't you need a newer
model), and 'tagbsearch' is on (which is the default), then finding a
tag in an unsorted tags file uses linear time, in a case-folded sorted
tags file it uses logarithmic time, which is much faster, especially
for large tags files.
Best regards,
Tony.
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXutxihhmz38GMK7xiyYcAWtY1ogXfwPAsWaarGczcnp9Q%40mail.gmail.com.
No comments:
Post a Comment