Ori Livneh wrote:
On Mon, Dec 9, 2013 at 2:58 PM, Ryan Kaldari rkaldari@wikimedia.org wrote:
I am somewhat concerned about the implications for JS debugging here. Debugging JS problems with the live sites is already pretty complicated:
- debug=true won't reproduce some bugs (usually race condition related)
Yeah, debug mode sucks. I think we need to think it over.
Currently it goes something like this, as I understand it: by default, all CSS and JavaScript is concatenated and minified as much as practically possible. If you pass a "debug=true" URL parameter to index.php, you can disable this concatenation and minification of CSS and JavaScript (which largely, if not exclusively, come through via load.php/ResourceLoader).
I believe there's been extensive discussion on this mailing list about the trade-offs being made here. Perhaps it's time for another discussion.
* Minification reduces bandwidth usage. ** At the cost of making debugging more difficult.
* You can specify debug=true. ** Specifying the URL parameter can damage reproducibility. ** URL parameter is non-obvious to just about everyone. *** Could add an HTML comment at least pointing people in this direction.
* Minification is a form of obfuscation and it harms the open Web.
I'm not sure what the right answer is here. The damage to reproducibility and the open Web hurts a lot. The performance hit may hurt more.
MZMcBride