> + { > + tags = tm_tags_find(q->workspace->tags_array, s->str, s->len, &ntags); > + foreach_c_array(ptag, tags, ntags) > + g_queue_insert_sorted(&res, *ptag, tag_compare_ptr, &sort_options); > + } > + } > + > + /* Filter tags according to scope, type and lang. */ > + for (node = res.head; node; node = next) > + { > + gboolean match = TRUE; > + > + next = node->next; > + tag = node->data; > + foreach_ptr_array(scope, i, q->scopes) > + match = match && (g_strcmp0(tag->scope, scope) == 0);
I'm not worried about best possible speed, just about not being super slow. The performance problem with the global tag array I mentioned is half a second UI freeze (for each global_tags and tag_array) on the first access. This is unbearable.
For this code I care a bit more about readability. I tried to add some breaks there but it would really be ugly IMO.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.