[mms] Performance optimizations in the parser.