Fix perf issues related to truncating labels