cinnyapp / cinny-desktop

Yet another matrix client for desktop
GNU Affero General Public License v3.0
415 stars 49 forks source link

Ship readable JS code #275

Open b1ek opened 7 months ago

b1ek commented 7 months ago

Describe the problem

It gets pretty hard to debug an issue when the trace ends up in function A() on index.js:1:348627648235769 or something like that

Describe the solution you'd like

I think that the desktop app does not even need the code to be minified or compressed at all.

Afterall, those are not downloaded each time a user opens the app, right? Even if it is, gzipping the non minified bundle will yield pretty much the same size as minifying.

Alternatives considered

Perhaps ship a debug bundle? Just like i said before, it is not as costly as it would be when deploying a web app. Most of the binary size is tauri's engine anyway, so extra 2~5 MB wouldn't make a difference.

Additional context

No response

lunaisnotaboy commented 5 months ago

Not a really good idea. What would be a good idea is source maps, not debug code. Debug code contains extra code for, well, debug. Not release.

b1ek commented 5 months ago

Debug code contains extra code for, well, debug. Not release.

what is exactly the drawback though? i would be surprised if it affects performance somehow, and it would make all the bug reports much more useful

lunaisnotaboy commented 5 months ago

It would impact performance, as it would make all of those extra debug calls that aren't going anywhere. And again, debug code wouldn't be useful. Source maps would.