improve formatter performance.
try to fix performance regression on metalua