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.
@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.
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 :wink:
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.
https://github.com/electron-userland/electron-builder/wiki/Options .build.compression is what I mean (I don't know how it compresses the output).
The option seems to take effects for app whole, e.g. zip.
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 :smile:
Jira ticket for reference: https://mattermost.atlassian.net/browse/MM-14107
Most helpful comment
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 :smile: