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

How does compiling in DEV mode affect performance? #136

Open
iteles opened this issue Mar 9, 2019 · 1 comment
Open

How does compiling in DEV mode affect performance? #136

iteles opened this issue Mar 9, 2019 · 1 comment

Comments

@iteles
Copy link
Member

iteles commented Mar 9, 2019

I have seen some production Elm apps still 'compiling in dev mode', presumably either because this was forgotten or because someone is still working actively on them.

image

How does this affect performance if at all? Does it have any negative effects in production?

@iteles iteles added the question label Mar 9, 2019
@yousefvand
Copy link
Contributor

According to documentation (or you can use: elm make --help) the --optimize switch does at least two things:

  1. Renaming variables so the overall size of app reduces (Also it can be considered as basic obfuscation if you are concerned about your code being reverse engineered.
  2. Unboxing values which means less memory resumption and faster code due to less memory lookup.

So how much --optimize is beneficial differs form app to app and needs extra benchmarking on app for a precise measure.

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

No branches or pull requests

3 participants