Use string builder instead of concatenation.
Use entry set iterator to avoid value lookup.