Fixed some performance issues in timeline