patch 8.2.0751: Vim9: performance can be improved
Problem: Vim9: performance can be improved.
Solution: Don't call break. Inline check for list materialize. Make an
inline version of ga_grow().
diff --git a/src/channel.c b/src/channel.c
index 1fcb845..68adbc3 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2399,7 +2399,7 @@
list_T *l = item->jq_value->vval.v_list;
typval_T *tv;
- range_list_materialize(l);
+ CHECK_LIST_MATERIALIZE(l);
tv = &l->lv_first->li_tv;
if ((without_callback || !item->jq_no_callback)
@@ -5302,7 +5302,7 @@
return FAIL;
}
- range_list_materialize(item->vval.v_list);
+ CHECK_LIST_MATERIALIZE(item->vval.v_list);
li = item->vval.v_list->lv_first;
for (; li != NULL && n < 16; li = li->li_next, n++)
{
@@ -5729,7 +5729,7 @@
listitem_T *li;
char_u *s;
- range_list_materialize(l);
+ CHECK_LIST_MATERIALIZE(l);
FOR_ALL_LIST_ITEMS(l, li)
{
s = tv_get_string_chk(&li->li_tv);