Pointing procmon at nmlc on windows reveals that before every actual read of a sprite png file, there's a full enumeration of the directory that sprite contains as nmlc attempts to normalise file case and check for potential duplicates/name collisions.
Obviously on windows this is really a nonsense, but it does impact performance in grfs that have a large number of input files in a directory. In my tests (boring hardware, large grf) 75% of the process time was apparently spent under find_file.
I think the obvious answer here is to simplify find_file to not handle case conversion at all (demand authors write better nml). Everything else is case sensitive.
Pointing procmon at nmlc on windows reveals that before every actual read of a sprite png file, there's a full enumeration of the directory that sprite contains as nmlc attempts to normalise file case and check for potential duplicates/name collisions.
Obviously on windows this is really a nonsense, but it does impact performance in grfs that have a large number of input files in a directory. In my tests (boring hardware, large grf) 75% of the process time was apparently spent under find_file.
I think the obvious answer here is to simplify find_file to not handle case conversion at all (demand authors write better nml). Everything else is case sensitive.