Skip to content

Dart AOT compile is required for the server side #36782

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

Closed
insinfo opened this issue Apr 27, 2019 · 3 comments
Closed

Dart AOT compile is required for the server side #36782

insinfo opened this issue Apr 27, 2019 · 3 comments

Comments

@insinfo
Copy link

insinfo commented Apr 27, 2019

when the AOT build for server-side applications is available, I'm developing server-side applications for Flutter and AngularDart with the Aqueduc framework, and I see that the startup and response times of the REST APIs are very high, the latency is very large.

ahead-of-time improve the startup time and reduce the memory footprint of VM-based applications.
Native images load faster because they don't have much startup activities, and require a static amount of fewer memory (the memory required by the JIT compiler);
Native images can share library code, while JIT-compiled images cannot.
If the application requires performance, then AOT is definitely the way to go. Needing to recompile during development is not an issue either, since AOT should be done during deployment, during which interfaces no longer change. Bytecode images generate a lot more code between function calls, so AOT having one additional jump instruction is still faster than regular JIT code.

I saw that there have been significant strides here,
https://medium.com/dartlang/dart-on-llvm-b82e83f99a70
why was not this continued?

Today we have WebAssembly, which can also be a target for AOT compilation in addition to x64 Windows / Linux

The JIT build used during development that is especially fast makes a lot of sense. More so, when an application is ready to be released, the AOT build makes more sense.

The AOT compiler is also needed to protect the source code, since it is not necessary to send the source code, but the compiled program.

  • Dart SDK Version 2.2
  • Windows / Linux
  • Chrome
@mraleph
Copy link
Member

mraleph commented Apr 27, 2019

Duplicate of #34343

@mraleph mraleph marked this as a duplicate of #34343 Apr 27, 2019
@mraleph mraleph closed this as completed Apr 27, 2019
@mraleph
Copy link
Member

mraleph commented Apr 27, 2019

Note: while it is true that AOT has better startup time for many use cases JIT is likely provide better peak performance.

That said we are working on exposing the very same AOT compilation pipeline that is being used by Flutter as part of the Dart SDK. Stay tuned.

@insinfo
Copy link
Author

insinfo commented Apr 27, 2019

@mraleph Many thanks for the feedback, I'm looking forward to an alpha version of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants