Huge speed improvement

Extracting information directly from frame object rather than
calling getframeinfo.