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

Hot-swap code, reduce full-reload situations #15860

Closed
sethladd opened this issue Jan 2, 2014 · 10 comments
Closed

Hot-swap code, reduce full-reload situations #15860

sethladd opened this issue Jan 2, 2014 · 10 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-enhancement A request for a change that isn't a bug vm-hot-reload

Comments

@sethladd
Copy link
Contributor

sethladd commented Jan 2, 2014

As projects grow, and more app-y experiences are built, performing a full reload to test a fix tends to slow down development. Hot-swapping code can significantly speed up development. For example, change a method's implementation and see the effects immediately.

@sethladd
Copy link
Contributor Author

sethladd commented Jan 2, 2014

Not sure where to triage this issue, starting with Editor, though I assume some VM work is also needed.

@devoncarew
Copy link
Member

I will re-triage this to the VM :) I think the bulk of the work will occur there.


cc @mhausner.
Removed Area-Editor label.
Added Area-VM label.

@DartBot
Copy link

DartBot commented Jan 2, 2014

This comment was originally written by @mhausner


We designed the language and runtime to make load times very fast, so I'm not sure whether there is a problem in the first place. Hot-swapping code probably would mean to invalidate a lot (if not all) compiled code, so the benefit of such a feature would have to be put in perspective to the complexity it adds to the runtime.


cc @iposva-google.

@johnmccutchan
Copy link
Contributor

A potential use case:

Game developer working on game and wants to improve a boss AI logic. This logic is limited to a single function. The time it takes to launch the game (loading assets from disk/network, processing them, uploading to GPU, etc) and then load the boss's stage is a high price to pay given the programmer has only changed the logic in one function.

@sethladd
Copy link
Contributor Author

sethladd commented Jan 2, 2014

Reloading is fast. However, getting the app back into the correct state is potentially not fast. Not just for games, but for complex apps with many screens that require a user to click through "deep" into the app.

@DartBot
Copy link

DartBot commented Mar 26, 2014

This comment was originally written by @Andersmholmgren


Nothing beats the productivity you get when you have one window showing the browser and another the editor side by side and as you change any source (dart CSS HTML etc) you see the changes immediately in the browser. That would be a big feather in darts cap IMO

@sethladd
Copy link
Contributor Author

sethladd commented Aug 3, 2014

Another use case: building a server. Servers often need to connect to various external resources: database servers, memcache servers, etc. Establishing all those connections on startup is non-trivial. I'd love to be able to edit files for the server, and just hit reload, and the VM or framework detect the file is dirty and reload it without having to restart the server.


Changed the title to: "Hot-swap code, reduce full-reload situations".

@sethladd sethladd added Type-Enhancement area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Aug 3, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Feb 29, 2016
@johnmccutchan
Copy link
Contributor

The VM now supports hot reload. Closing.

@gnomesley
Copy link

Any plans for hot reload in Dartium?

@johnmccutchan johnmccutchan removed their assignment Jun 27, 2017
@zoechi
Copy link
Contributor

zoechi commented Jul 3, 2017

@gnomesley no, Dartium is going to die and be replaced by DDC
There is currently no hot reload for DDC and AFAIK no current plans to support it (that might change eventually when DDC becomes more mature)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-enhancement A request for a change that isn't a bug vm-hot-reload
Projects
None yet
Development

No branches or pull requests

7 participants