Add profiling ability, move loadMaterialList outside of per-grain processing