Performance improvement on NameGenerator