tags:

views:

660

answers:

3

So, as the title says, when GWT compiles Java into JavaScript, is the result just minified, or is it obfuscated also?

+5  A: 

According to the GWT FAQ the code is obfuscated, but they state that "This is partly done to protect the intellectual property of the application you develop, but also because obfuscation reduces the size of the generated JavaScript files". I'm not sure if this is true obfuscation or just variable/method renaming and stripping of whitespaces. A "true" obfuscation might actually make the code larger than the original code.

Kim L
+2  A: 

I'd also like to say that the GWT compiler minifies Js because of its optimization. It will, for example, inline method calls where possible and rename variables to shorter names.

Miguel Ping
A: 

Target is to get as small (and fast) code as possible. "Obfuscation" is just a consequence.