improve parse and serialize performance