Changed the MAME XML reader to read a game at a time directly into the games map instead of read everything into an intermediary structure first. Thanks to dsal in #go-nuts for the suggestion.