> > 
> > Before setting any quickfix list it takes 0.22s. After setting a
> > quickfix list with 80000 entries it takes 6.5 seconds, which is
> > actually worse than how it was before the last patches (it took then
> > 3.56s).
> 
> Strange.  Oh, perhaps it's because this "mybuf" is near the start of the
> buffer list?  I reversed the search order, thinking that there is a
> higher chance of searching for a newer buffer.
> 
> You can try changing buflist_findname_stat() from:
> 
>     for (buf = lastbuf; buf != NULL; buf = buf->b_prev)
> 
> To:
> 
>     for (buf = firstbuf; buf != NULL; buf = buf->b_next)
> 

Is it worth the effort to try using a data structure with faster lookup times 
than a linear search of a linked list?

I imagine 80,000 buffers is not a very common case but just using a BST of some 
kind could probably improve that performance immensely, and probably won't hurt 
the more common cases noticeably. I assume there is a unique ID (like the 
buffer number?) we could use for the key.

-- 
-- 
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.

Raspunde prin e-mail lui