Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic update #12073

Open
AlexRMU opened this issue Apr 3, 2024 · 1 comment
Open

Dynamic update #12073

AlexRMU opened this issue Apr 3, 2024 · 1 comment
Labels
feature request New feature or request size:large significant feature with tricky design questions and multi-day implementation
Milestone

Comments

@AlexRMU
Copy link

AlexRMU commented Apr 3, 2024

Describe the problem

Sometimes the changes in the new version are so minor that updating the page and all the resources to apply them is very inefficient.
I suggest creating a dynamic update feature similar to hot reload.

Describe the proposed solution

The idea is very crude.

I suggest:

  • plan_dynamic_update - a function that will schedule dynamic_update to run on navigation
  • dynamic_update - a function that triggers a dynamic update

Dynamic update:

  1. a certain manifest is updated
  2. it is compared with the current version manifest
  3. only the modified parts of the application are updated
    • static assets are being reloaded
    • sw is being updated (Update service worker when new version is detected #3667)
    • server side and endpoints with load dependencies are updated, live connections are not interrupted
    • components are being updated, other components are not affected and their state does not change
      • for example, the page component has changed, it is being reloaded, but the layout component is not affected, as if normal navigation had occurred
      • for example, a component has changed in the depth of the page, and if the component is usually imported and treated as a constant, now it becomes a reactive variable and restarts the dependent code when updating

It seems like it's going to be difficult or impossible.

Alternatives considered

No response

Importance

nice to have

Additional Information

https://rauchg.com/2014/7-principles-of-rich-web-applications#push-code-updates
gaearon/react-hot-loader#38

@eltigerchino eltigerchino added the feature request New feature or request label Apr 3, 2024
@eltigerchino eltigerchino added this to the non-urgent milestone Apr 3, 2024
@eltigerchino eltigerchino added the size:large significant feature with tricky design questions and multi-day implementation label Apr 3, 2024
@AlexRMU
Copy link
Author

AlexRMU commented Apr 4, 2024

You can create a component that will allow/disallow update for its children.
Or make an additional option in the svelte:options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request size:large significant feature with tricky design questions and multi-day implementation
Projects
None yet
Development

No branches or pull requests

2 participants