Finished line based diff optimization