Make expensive string manipulation depend on settings