[Github-comments] [geany/geany] TM cleanups (#957)

Jiří Techet notifications at xxxxx
Wed May 4 12:45:27 UTC 2016


> +
> +
> +TMTagType tm_parser_get_tag_type(gchar kind, TMParserType lang)
> +{
> +	TMParserMap *map = &parser_map[lang];
> +	guint i;
> +
> +	for (i = 0; i < map->size; i++)
> +	{
> +		TMParserMapEntry *entry = &map->entries[i];
> +
> +		if (entry->kind == kind)
> +			return entry->type;
> +	}
> +	return tm_tag_undef_t;
> +}

I don't think the lookup will be a bottleneck - compared to reading characters during parsing, tags are generated quite rarely and even with the current TMTag generation where the whole tag type strings are compared, I've never seen this in the profile. So I'd skip this for now.

---
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/957/files/aea7d7845917843dd6b02e5a8dc9031cabc87a86..5d9376ea801a6e6c3ec22748741362a3a2eff7ac#r62031764
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160504/6678a7e1/attachment.html>


More information about the Github-comments mailing list