sorts icon indicating copy to clipboard operation
sorts copied to clipboard

Animation Speed

Open GlacialBlaze opened this issue 4 years ago • 0 comments

This sorting visualiser using Matplotlib is very simple to understand. This is good. However, I noticed that when the number of items in the list grows starting from 300 onwards, the performance drop becomes more significant. One thing I notice is that the animation update is inefficient:

def update_fig(A, rects, iteration):
    for rect, val in zip(rects, A):
        rect.set_height(val)

Is there a solution to make the update fast? Or is the performance bottleneck somewhere else?

GlacialBlaze avatar Jul 15 '20 15:07 GlacialBlaze