I'm implementing a React application which renders dynamic data grids. In a recent requirement I've integrated MaterialUI Progress component to give feedback to the user when the table is loading/rendering data. I've used the Progress Component in indeterminate mode as I do not know how long the data request and page redraw will take.
Now for the problem: The progress indicator works well during the time of the data request, however during rendering - which might take some 100ms depending on the number of cells displayed the progress indicator just does not animate.
From my research I've found the progress indicators use css keyframe animations. I was not aware the keyframe animations do just stop during busy rendering. In an experiment I've included a plain old gif animation spinner which seems to continue running during busy rendering.
Can anyone please elaborate on the reasons why the gif animation works well while the keyframe animation just stops running? Is there a simple way around this problem? Using a gif seems viable however this just feels a bit outdated and not as flexible as the css approach. How can I optimize my application in order to show a smooth loading animation even if rendering runtime of a component is taking long.
Thanks for your help, Martin