Fixed some performance issue in timeline