In src/tagmanager/tm_query.c:

> +		{
> +			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);

as you seem worried about speed, better break out early when match becomes false, as it will just keep being false on and on


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.