mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
274 stars 182 forks source link

If extension matches a loader - use it immediately #2060

Closed vedadb closed 4 months ago

vedadb commented 5 months ago

The current loader actually tries to use all loaders/interfaces to determine which one to use which is a waste of computational efforts. Not a super huge thing, but until now I used a custom load function to speed this part up which I want to get rid of.

Here, if the extension matches a loader it will use it immediately. And the loading time decreases for these cases substantially. For an if my h5oina files the load time decreases from 3.6s -> 1.0s.

I would also propose that someone updates the getMTEXpref.EBSDExtensions and use it to guess the interface instead of running through all loaders in check_interface.