t-artistik / browserscope

Automatically exported from code.google.com/p/browserscope
Apache License 2.0
0 stars 0 forks source link

Some possible optimizations in the JavaScript used on Browserscope #258

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attached is a patch against revision 699 that gets rid of some unneeded 
JavaScript and does some minor optimizations here and there, like declaring 
multiple variables in one go instead of in separate `var` statements..

Note that setting `el.type = "text/javascript"` or `el.type = "text/css"` in JS 
is not needed since all browsers default to these values automatically. (This 
is also the reason why in HTML5 these attributes are optional in most cases.)

Original issue reported on code.google.com by mathias%...@gtempaccount.com on 3 Sep 2010 at 2:37

Attachments:

GoogleCodeExporter commented 9 years ago
Hey Mathias, looks great! Would you mind to remove the optimizations that group 
var settings together though? We use the closure-compiler(see 
static/compile_js.sh) to produce the code for production, and it will do 
inlining for us. For debugging, I find it easier and more readable to have 
variable declarations independent of one another.
Then I'll just apply your patch and commit it!

Original comment by els...@gmail.com on 6 Sep 2010 at 8:31

GoogleCodeExporter commented 9 years ago

Original comment by mathias%...@gtempaccount.com on 7 Sep 2010 at 3:51

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r713.

Original comment by els...@gmail.com on 1 Oct 2010 at 3:23