May be we can encode metric id some where higher ? To avoid encode every time.