0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0165: looking up a text property type by ID is slow

Problem:    Looking up a text property type by ID is slow.
Solution:   Keep an array of property types sorted on ID.
This commit is contained in:
Bram Moolenaar
2022-08-07 18:20:08 +01:00
parent c390cc13e5
commit e44336b00a
3 changed files with 85 additions and 36 deletions

View File

@@ -3084,6 +3084,7 @@ struct file_buffer
#ifdef FEAT_PROP_POPUP
int b_has_textprop; // TRUE when text props were added
hashtab_T *b_proptypes; // text property types local to buffer
proptype_T **b_proparray; // entries of b_proptypes sorted on tp_id
garray_T b_textprop_text; // stores text for props, index by (-id - 1)
#endif