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

Remove denort optimization #10350

Merged
merged 2 commits into from
Apr 26, 2021
Merged

Remove denort optimization #10350

merged 2 commits into from
Apr 26, 2021

Conversation

ry
Copy link
Member

@ry ry commented Apr 24, 2021

denort is an optimization to "deno compile" to produce slightly smaller
output. It's a decent idea, but causes a lot of negative side-effects:

  • Deno's link time is a source of constant agony both locally and in CI,
    denort doubles link time.
  • The release process is a long and arduous undertaking with many manual
    steps. denort necessitates an additional manual zip + upload from M1
    apple computers.
  • The "deno compile" interface is complicated with the "--lite" option.
    This is confusing for uses ("why wouldn't you want lite?").

The benefits of this feature do not outweigh the negatives. We must find
a different approach to optimizing "deno compile" output.

Fixes #10056

denort is an optimization to "deno compile" to produce slightly smaller
output. It's a decent idea, but causes a lot of negative side-effects:

- Deno's link time is a source of constant agony both locally and in CI,
  denort doubles link time.
- The release process is a long and arduous undertaking with many manual
  steps. denort necessitates an additional manual zip + upload from M1
  apple computers.
- The "deno compile" interface is complicated with the "--lite" option.
  This is confusing for uses ("why wouldn't you want lite?").

The benefits of this feature do not outweigh the negatives. We must find
a different approach to optimizing "deno compile" output.
@ry ry requested a review from piscisaureus April 24, 2021 14:10
@nettybun
Copy link

why wouldn't you want lite?

Are you saying that lite will become the default for compile binaries? Or that instead all binaries will include unnecessary code like the formatter, linter, bundler, webgpu etc. I understand wanting to have less build complexity for sure but curious if there any size goals are for compiled binaries compared to the normal deno executable

@AaronO
Copy link
Contributor

AaronO commented Apr 24, 2021

@ry Maybe a good tradeoff would be to only enable denort builds for main commits and releases, that would still speedup CI for PRs whilst having it CI'd in main and available for releases. (Not sure if there are many denort specific tests)

@AaronO
Copy link
Contributor

AaronO commented Apr 24, 2021

But in general I agree that having faster CI is more beneficial to deno (improving iteration speed) than smaller binaries for deno compile

@nettybun
Copy link

Would it make sense to provide docs like "How to compile a minimal Deno yourself with less features"? Not sure if custom builds would be approachable to devs interested in smaller executables but without deep knowledge of Deno's workings - maybe it's as simple as commenting out components from the entry point file (likely not 😅) or maybe is Deno simply too tightly wired together to drop any features without panics...

@piscisaureus
Copy link
Member

LGTM. @bartlomieju ok?

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit f7c298e into denoland:main Apr 26, 2021
@ry ry deleted the rm-denort branch April 26, 2021 17:28
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

Successfully merging this pull request may close these issues.

Remove denort because link time is too slow
5 participants