thuansaritasa / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

SWFObject Optimization #325

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I just downloaded last version (2.2) to use it and I made a few changes to
optimize the shrinked size : 
function cleanup and onDomLoad are only called by themselves, so you don't
need to name them : 
/*onDomLoad = */ function(){...

You used OBJECT = "object" constant but not everywhere (one place is missing)

Many var could be combined to reduce the weight
var b = doc.getElementsByTagName("body")[0];
var o = createElement(OBJECT);
becomes :
var b = doc.getElementsByTagName("body")[0]
,o = createElement(OBJECT);

Bye,

Thomas.

Original issue reported on code.google.com by piartt on 13 Jun 2009 at 6:58

GoogleCodeExporter commented 9 years ago
Thanks for the feedback, we will take the optimizations into account for the 
next dev
cycle.

Original comment by bobbyvandersluis on 13 Jun 2009 at 7:29

GoogleCodeExporter commented 9 years ago
Great !
(This informations are simply comming from yuicompressor in verbose mode)

Original comment by piartt on 14 Jun 2009 at 2:57

GoogleCodeExporter commented 9 years ago

Original comment by platelu...@gmail.com on 18 May 2011 at 8:10

GoogleCodeExporter commented 9 years ago
Hi, I postes this request a long time ago. Google Closure Compiler made this 
change unnecessary. So, you should not trade code readability for yui compiler 
specific optimisation.

Thanks

Thomas

Original comment by piartt on 18 May 2011 at 8:14

GoogleCodeExporter commented 9 years ago
Hi, I postes this request a long time ago. Google Closure Compiler made this 
change unnecessary. So, you should not trade code readability for yui compiler 
specific optimisation.

Thanks

Thomas

Original comment by piartt on 18 May 2011 at 8:14

GoogleCodeExporter commented 9 years ago
Hi, I postes this request a long time ago. Google Closure Compiler made this 
change unnecessary. So, you should not trade code readability for yui compiler 
specific optimisation.

Thanks

Thomas

Original comment by piartt on 18 May 2011 at 8:15

GoogleCodeExporter commented 9 years ago
Thanks for the update.  This submission still serves as a reminder that we can 
clean up the code in a few places, so I will leave it open for now.

Original comment by platelu...@gmail.com on 18 May 2011 at 9:21

GoogleCodeExporter commented 9 years ago
Made a few small tweaks for consistency in the latest edits. Not making many 
optimizations; Google Closure makes many optimizations for us.

Original comment by platelu...@gmail.com on 1 Jun 2011 at 5:11