On Fr, 16 Mär 2018, [email protected] wrote:

> Hello!
> 
> When I want to remove most but not all of the signs from a buffer, I loop 
> over a list of the signs' ids and execute `sign unplace id` for each one.
> 
> However this can be quite slow and cause a noticeable lag in the UI.
> 
> I don't know how to profile Vim itself (as opposed to Vimscript, which is 
> well documented).
> 
> Instead I looked at the code and found the `sign unplace` implementation [1]. 
>  It calls `buf_delsign()` [2] and `update_debug_sign()` [3].
> 
> As far as I can tell, each `sign unplace` triggers a full redraw of all 
> windows showing the sign.  Would it be feasible to redraw only the sign 
> columns?  I imagine that would be far less expensive.
> 
> I was also wondering whether it would be feasible to extend `sign unplace` to 
> accept a list of ids, and remove all of them before redrawing the relevant 
> windows once?
> 
> Many thanks in advance!

I would rather have a possibility to interact with signs using VimScript 
API directly. I have posted a patch once here:
https://groups.google.com/d/msg/vim_dev/k_NktnNMCk8/yPGvY-E_S2MJ

It's still available:
https://github.com/chrisbra/vim-mq-patches/blob/master/sign_functions

However it needs to be reworked to remove the old K&R C code and all the 
changes to the Vim source (e.g. renaming parts of eval.c to evalfunc.c) 
etc.

One we have a nice Vimscript API for the signs, we could easily add 
functions to remove/replace sign functions (and skip redraws until all 
ids have been processed).

Best,
Christian
-- 
Daß wir miteinander reden können, macht uns zu Menschen.
Aber so verdeckt war es doch wesentlich interessanter.
                -- Karl Jaspers

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