render_async icon indicating copy to clipboard operation
render_async copied to clipboard

Add delay before performing async call

Open Mbuckley0 opened this issue 4 years ago • 4 comments

I'd like to set something up similar to the retry_delay so that I can wait a few seconds before certain asynchronous calls are made. My example use case is that I have a dashboard which has some fairly database intensive queries in it. I'd like to do async calls for all of the elements visible at the top of the page first so that they come in faster and then a second or so later it will perform the calls for the other elements.

Mbuckley0 avatar Mar 10 '21 00:03 Mbuckley0

Thanks for the idea, @Mbuckley0. I believe this would an interesting feature for other users. Did you try to implement something yourself already?

nikolalsvk avatar Mar 12 '21 07:03 nikolalsvk

Not yet. It should be pretty easy to implement using setTimeout. I'm happy to add it in and create a PR for it.

Mbuckley0 avatar Mar 12 '21 07:03 Mbuckley0

Sure, let's add it and see how it looks, thank you

nikolalsvk avatar Mar 12 '21 13:03 nikolalsvk

Hey guys, looking for exactly this. The idea is to load a bunch of orders and for each order call an async render with a staggered delay, to avoid having all the partial to be fired at once. For example i'd like to load each partial with a 100ms delay.

Has anyone already tried this?

pastullo avatar Jan 25 '22 15:01 pastullo