Enable Loading effect in canvas

Hi,
I am using TreeLayout to display large set of data. During the time of rendering canvas shows empty. How can I implement loading effect during the canvas rending?

JavaScript in a browser is single-threaded, so while processing a lot of data, no other JavaScript can run that could update the page.

However, you can implement a CSS animation so that the user knows that something is going on. An example is at: Virtualized Sample with no Layout