Skip to content

xdgmime: Use memmem when we can

Matthias Clasen requested to merge faster-contenttype-guess into master

When comparing magic without a mask, we can use the optimized function that glibc has for this purpose.

This makes g_content_type_guess drop from 10% to 3% in some of my GTK profiles. Still not ideal. It would be much better if we could ask 'Which of these 3 types is it?' style questions.

Merge request reports