[Optimize] transform consecutive pointer movements