optimize mapper lowercase memory usage