Improve history view perf