optimize log viewer