JSMin compressor, used in 5.1.0-RC1 fails in some cases

1 view
Skip to first unread message

Alexander Obuhovich

unread,
Jul 2, 2010, 5:57:04 AM7/2/10
to In-Portal Bugs
In 5.1.0-RC we have ability to compress css and js files. For JS file compression we use JSMin library, which fails to work on attached file.

I propose, that we use YUICompressor, when java is available on web server and use JSMin, when java is not available.

JAR file must be places together with other minify helpers.

Attached patch adds ability to use YUICompressor.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
ui.datepicker-lv-LV.js
yuicompressor-2.4.2.jar
yui_compressor_added.patch

Dmitry Andrejev

unread,
Jul 2, 2010, 4:08:34 PM7/2/10
to in-port...@googlegroups.com
Hi Alex,

Just some basic questions:

1. What about performance? 

Is there a guaranty it's not going to be a bottle neck. Do we really need that Java part just because we can't compress this kind of file/line?

2. Not sure I have fully understood your 2nd message.


DA. 

On Fri, Jul 2, 2010 at 5:22 AM, Alexander Obuhovich <aik....@gmail.com> wrote:
Also I think, that we should new compressed file and return link to it for cases, when we use <inp2:m_Compress type="js/css">sample code to compress</inp2:m_Compress>.
--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Dmitry Andrejev

unread,
Jul 5, 2010, 2:38:14 AM7/5/10
to in-port...@googlegroups.com
Thanks for your answers:

1. Okay. I understand and have no problem with YUICompressor itself.

2. Will be testing this and writing out the cases

Thanks.

DA.

On Sat, Jul 3, 2010 at 5:45 AM, Alexander Obuhovich <aik....@gmail.com> wrote:
  1. We don't have much choice here. Since JSMin isn't working as expected in all cases, then we need to find another library, that does work. I doubt, that it's first time you hear about YUICompressor, since all jQuery is compressed using it. Performance doesn't matter here, since once js/css file is compressed, then YUICompressor ins't involved. Don't know if Java is installed on most hostings or if there is YUICompressor implementation on PHP either.
  2. Please write down, how <inp2:m_Compress..> tag works (like, I write this code and I got this result) for all possible cases. In case if question still persists, then I will explain further based on usage samples you will provide.

Alexander Obuhovich

unread,
Jul 5, 2010, 11:30:39 AM7/5/10
to in-port...@googlegroups.com
Found a bug in proposed patch:

replace

if (!is_null($compressed_string)) {
               return ;
            }



with:

if (!is_null($compressed_string)) {
                $string = $compressed_string;
                return ;
            }

Alexander Obuhovich

unread,
Jul 23, 2010, 5:36:00 PM7/23/10
to in-port...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages