sveltejs / svelte

web development for the rest of us
https://svelte.dev
MIT License
79.96k stars 4.25k forks source link

Async generators for components scheduled for rendering automatically based on how congested the main thread is #5017

Open frederikhors opened 4 years ago

frederikhors commented 4 years ago

Is your feature request related to a problem? Please describe. I'd like Svelte to be able to render asynchronously, a là "React Suspense", using async generators, an idea behind a new javascript framework called Crank.js.

It would be amazing to have components which can be scheduled for rendering automatically based on how congested the main thread is.

For example the navigation in the various routers, scheduled between requestAnimationFrame decongesting the main thread.

Describe the solution you'd like It would be great to know from @Rich-Harris if this feature has already been taken into consideration (I searched the issues before opening and found nothing), if it will be sooner or later or if it will not be at all.

Describe alternatives you've considered I don't have enough knowledge or skills to find other solutions or to understand if Svelte can take advantage of it - not having virtual DOM.

How important is this feature to you? I love Svelte with all my heart and I would like it to be the fastest ever.

antony commented 4 years ago

@frederikhors could you please raise this feature request using the template, rather than linking to the article? It would be much easier for us to consider if it were more concise and to the point :)

I'll re-open once the description is updated to provide the what, why, and perhaps some examples of why this feature is useful!

frederikhors commented 4 years ago

@antony, do you like it now? 😄

Conduitry commented 4 years ago

There are a few existing issues that are probably relevant that come up in a search for "suspense". I haven't really looked at any of them too closely though.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

frederikhors commented 2 years ago

Nope