[cvs-nhc98] patch applied (hat): Greatly improved the efficiency of pretty-hat