Closure Compiler compatibility
Since keeping a small JS footprint is critical for our application (see #178), it would be great to be able to compile SockJS via Google Closure Compiler with ADVANCED_OPTIMIZATIONS. Is compatibility with GCC on the v1.x roadmap?
This isn't something I had considered yet. I can see what kind of filesize difference it makes. Even if we don't use that for compilation by default, I don't see any reason you couldn't do it yourself from the non-minified version.
It looks like ADVANCED_OPTIMIZATIONS reduces the file size of the minified sockjs-0.3 from 29K to 25K, or a savings of roughly 17%. Not huge overall, but it makes a big difference for us. A.O. also tends to improve application speed by inlining stuff and removing dead code.
Since A.O. obfuscates unquoted property names, the main change needed for A.O. compatibility is to quote property names serialized over the wire. In detectProtocols, for example, info.websocket should be written as info['websocket']. Browsing through the code, I think the tweaks needed will be few and easy. If I have a few free minutes, I'll make them and submit a PR.
We want ADVANCED_OPTIMIZATIONS compatibility too...
This issue has been inactive for 30 days. It will be in closed in 5 days without any new activity.