4 ms·
practically speaking, I think for the most part, when folks talk about blocking execution, they are referring to the browser locking up while the long running p
by jordache 9y ago
practically speaking, I think for the most part, when folks talk about blocking execution, they are referring to the browser locking up while the long running process is running.
To gracefully establish expectation in the user - A processing indicator will buy the application some time before the user gets impatient. The setTimeout 0 pattern is useful to delay the long running process enough for the browser to redraw the UI to throw up the processing indicator.
One can further achieve another state in the processing indicator by leveraging time delayed CSS animation which runs in a thread that's parallel to JS. So you could use CSS to augment the content of the processing dialog while the blocking JS is running.