Adding Metrics and Solving OutOfMemory Exception