How to update the position of a polyline without flickering

I need to update a polyline (around 500-2000 points) frequently (around 10Hz). Is there a way to do this without the image flickering?

Example: