[Github-comments] [geany/geany] New tagmanager query module (#1187)

Thomas Martitz notifications at xxxxx
Tue Aug 23 07:04:41 UTC 2016


> +		{
> +			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 or view it on GitHub:
https://github.com/geany/geany/pull/1187/files/386006313a0b78c614bd1ac522ac121e093df58d#r75811952
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160823/eab38502/attachment.html>


More information about the Github-comments mailing list