Should one minify server code when it's in production? [closed] Should one minify server code when it's in production? [closed] python python

Should one minify server code when it's in production? [closed]


You're not going to have any improvement as the whitespaces and all formatting are lost when your server side code is translated to machine code (or interpreted). It's also not sent over the wire, it's read from the local filesystem, so while having less characters would lead to a faster startup, it would not make any difference on the long run and the startup speed gain would be marginal (or even unnoticeable).

So, no, minifying your server side code is basically useless, worse, it's probably going to make stack traces completely useless, as there's going to be a lot of code in the same line (and not necessarily with the same formatting you used).


I think that minification has more to do with reducing bytes on the wire than it does runtime efficiency.


i do not believe this offers any benefit to server side code since the server evaluates the code and doesn't actually send it down. If you are looking to optimize production code you can look into setting up a compiler cache such as APC for PHP