Description
JS sources seem be shipped as is, converted into a .cc file. They could be shipped minified though. Has there been previous discussions around this?
Obviously publicly visible identifiers must not change. Advantages are faster scanning, lower shipping binary size, and slightly lower memory use due to shorter identifiers. Disadvantage would be worse debuggability, but solvable by making this an option or providing source maps; and different inlining decisions with Crankshaft, which is going to be the past soon though.
V8 does minify its source in a step in the js2c build target. The minifier script is kind of bad though, as it uses regexes for parsing. It serves its purpose okayish, but sometimes parses incorrectly, resulting in confusing bugs.
Another option is to not ship the JS sources at all, but the precompiled bytecode. This likely increases the binary size though. V8's uses about 4x memory in the startup snapshot for precompiled bytecode vs equivalent minified source. That would also increase GC pressure.