Couldn’t you just go through your CSV file ONCE, and quickly look up if there is a map entry that needs to be processed?