| Page 1 of 1 | [ 2 posts ] |
|
Hi,
Thanks for Yui-compressor! Some observations: Yui-compressor can expand code size by inserting unnecessary braces: function x(y){if(y)return 1;return 0} becomes: function x(a){if(a){return 1}return 0}; (also not sure why the trailing ';' gets added). Other optimisations that I think might not be too difficult to implement: Combine multiple var statements: "var a;var b;" could become just "var a,b;". This can also be worthwhile for non-consecutive var statements with initialisers: var a=1;f(a);var b=g(2);h(b); becomes var a=1,b;f(a);b=g(2);h(b); saving 2-characters. Converting ';' to ',' can sometimes save the need for braces, saving a character or two: if(a){f();g()} becomes if(a)f(),g(); |
|
Please file a new ticket:
http://yuilibrary.com/projects/yuicompressor/newticket Conversations on the forum are not tracked so they are eventually forgotten. |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group