[00:10:16] Krinkle: The minifier is pretty dumb, but I think tracking braces as you said shouldn't be too hard [00:11:19] Alternatively, you could annotate the if statements with comments, and have PHP find them that way [00:12:09] e.g. if ( mw.debug ) { // #MW-DEBUG-STRIP-START [00:12:15] } // #MW-DEBUG-STRIP-END [00:13:06] The PHP code would then find those start/end comments and 1) in non-debug mode, strip those lines themselves and everything in between; 2) in non-debug mode, strip the start and end lines themselves but not the lines in between [23:14:33] TimStarling: I was wrong about the 5-50ms, that applies to individual module batches. the startup module is above average, e.g. 5ms for https://grafana.wikimedia.org/d/000000067/resourceloader-module-builds?orgId=1&var-module=skins_vector_styles_legacy vs 100-300ms for https://grafana.wikimedia.org/d/000000067/resourceloader-module-builds?orgId=1&var-module=startup