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

Investigate options to minify JavaScript on the Desktop Apps #387

Closed
jasonblais opened this issue Dec 6, 2016 · 8 comments
Closed

Investigate options to minify JavaScript on the Desktop Apps #387

jasonblais opened this issue Dec 6, 2016 · 8 comments

Comments

@jasonblais
Copy link
Contributor

jasonblais commented Dec 6, 2016

Jira ticket: https://mattermost.atlassian.net/browse/MM-14107

Currently the desktop app binary doesn't minify JavaScript source code. It also has test code embedded in there too.

This issue is opened to investigate if minification or compression could help reduce binary size and improve performance.

It might also be interesting to see if a JavaScript transpiler can optimize code in a way that would be useful for performance.

@jasonblais
Copy link
Contributor Author

@jnugh Would there be any additional information I could add to the issue?

I feel someone who didn't see the discussion in Desktop App might not really understand the full scope of what's talked about here.

@jnugh
Copy link
Contributor

jnugh commented Dec 7, 2016

A recap from what was discussed earlier:
The app is compressed (happens by default when using electron builder) so minification might not help too much regarding binary size. I didn't know there was test code in there, that makes no sense IMHO.

There are however transpilers that can find (and change) code that might be optimized regarding performance. Adding something like that to the webpack config should be pretty easy I guess. However I have no idea if this would have any measurable impact 😉

@yuya-oc
Copy link
Contributor

yuya-oc commented Dec 7, 2016

electron-builder archives the app codes with asar. As far as reading it, the codes are not compressed.
V8 parses JS codes when it's executed, so minification would improve performance due to shorter JS. However, I'm not sure how much impact there is.

Anyway, it's good idea to try minification.

@jnugh
Copy link
Contributor

jnugh commented Dec 7, 2016

https://github.com/electron-userland/electron-builder/wiki/Options .build.compression is what I mean (I don't know how it compresses the output).

@yuya-oc
Copy link
Contributor

yuya-oc commented Dec 7, 2016

The option seems to take effects for app whole, e.g. zip.

@jnugh
Copy link
Contributor

jnugh commented Dec 8, 2016

yeah thats what I mean - so when you minify js code the compression might not work as good. Both might just zero each other out.

But I would say - let's try it out and get some numbers 😄

@jasonblais jasonblais changed the title [Help Wanted] Investigate options to minify JavaScript on the Desktop Apps Investigate options to minify JavaScript on the Desktop Apps Mar 22, 2017
@jasonblais jasonblais added this to the Backlog (Unscheduled) milestone Mar 22, 2017
@yuya-oc yuya-oc mentioned this issue Apr 6, 2017
13 tasks
@jasonblais jasonblais modified the milestones: v3.10.0, Unscheduled Jul 8, 2017
@jasonblais jasonblais removed the Hacktoberfest null label Nov 3, 2017
@amyblais amyblais removed this from the v4.2.0 milestone Mar 21, 2018
@amyblais amyblais added the Hackfest null label Jan 25, 2019
@amyblais
Copy link
Member

Jira ticket for reference: https://mattermost.atlassian.net/browse/MM-14107

@amyblais amyblais changed the title Investigate options to minify JavaScript on the Desktop Apps [Help Wanted] Investigate options to minify JavaScript on the Desktop Apps Feb 27, 2019
@amyblais amyblais removed the Hackfest null label Mar 1, 2019
@amyblais amyblais added the Hacktoberfest null label Oct 7, 2019
@hanzei hanzei changed the title [Help Wanted] Investigate options to minify JavaScript on the Desktop Apps Investigate options to minify JavaScript on the Desktop Apps Oct 22, 2019
@amyblais amyblais removed the Hacktoberfest null label Nov 4, 2019
@jespino jespino added the Hacktoberfest null label Sep 21, 2020
@jespino jespino removed the Hacktoberfest null label Jan 14, 2021
@cpanato cpanato added the Hacktoberfest null label Oct 2, 2021
@devinbinnie
Copy link
Member

JIRA ticket was closing and this wasn't, so closing this as well.
We can look into this in the future if we deem necessary.

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

7 participants