Why so many blank lines in this vector component? $ cat yy set 'http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module...' GET $1|perl -nwe 'print " $." if /^$/' $ sh yy # These lines are blank: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 26 27 28 29 32 33 34 37
http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module... is affected too.
Yes these aren't meant for human consumption.
These blank lines should not - under any circumstances - be here. But I do know why they are...
Tim Starling modified the standard distribution of JSMin[1] in some good and some bad ways. These blank lines are the result of one of these modifications which I find to be misguided. He's basically only compressed horizontal white-space, leaving new line characters in place. The blank lines you see are where the comments used to be.
I have made this point before, clearly upon deaf ears - but I will make it again.
* ResourceLoader has 2 modes. Production and Development (or debug) mode. * Production mode should be as fast as possible for users, period. * Development mode should be as easy as possible for developers, period. * Any attempt to blend the two only serves to diminish the effectiveness of either mode.
If you want a version of the script that has not been compressed add debug=true to the URL or set $wgResourceLoaderDebug = true; in your LocalSettings.php.
This particular change (the "don't delete line breaks" part of r73196) should be reverted, Tim's good changes should be pushed upstream, and we should be using a standard JSMin distribution whenever possible.
- Trevor
[1] http://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki/author/tst...
On 12/7/10 5:32 AM, jidanni@jidanni.org wrote:
Why so many blank lines in this vector component? $ cat yy set 'http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module...' GET $1|perl -nwe 'print " $." if /^$/' $ sh yy # These lines are blank: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 26 27 28 29 32 33 34 37
http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module... is affected too.
Yes these aren't meant for human consumption.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
"TP" == Trevor Parscal tparscal@wikimedia.org writes:
TP> debug=true to the URL
Say, if debug=false is the default, then perhaps these production URLs
http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module...
could be shorter.
Aren't we back to micro-optimizing again?
- Trevor
On 12/7/10 9:24 AM, jidanni@jidanni.org wrote:
"TP" == Trevor Parscaltparscal@wikimedia.org writes:
TP> debug=true to the URL
Say, if debug=false is the default, then perhaps these production URLs
http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module...
could be shorter.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Also - no, you don't want to remove those because the $wgResourceLoaderDebug setting is overridden by the URL - so if you take the debug=false out it will no longer be a stateless URL - as in a changed to $wgResourceLoaderDebug would cause it to be one way or another - by specifying it explicitly it's predictable.
- Trevor
On 12/7/10 10:17 AM, Trevor Parscal wrote:
Aren't we back to micro-optimizing again?
- Trevor
On 12/7/10 9:24 AM, jidanni@jidanni.org wrote:
> "TP" == Trevor Parscaltparscal@wikimedia.org writes:
TP> debug=true to the URL
Say, if debug=false is the default, then perhaps these production URLs
http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module...
could be shorter.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org