Improve performance of line graphs
