FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 08-19-2012, 07:14 PM
Pau Garcia i Quiles
 
Default Minified javascript files

On Sun, Aug 19, 2012 at 8:10 PM, Simon Josefsson <simon@josefsson.org> wrote:

>> As for
>> verification, having the source next to the minified version does not
>> guarantee anything about the minified version, all the more that we
>> don't have currently in Debian Wheezy a reliable minifier.
>
> That seems problematic -- so even if the source is shipped, there is no
> way to re-build the minified file?

It really depends on using exactly the same version of the same
minifier with exactly the same parameters (which you may not know) and
even then you cannot be sure, e. g. a minifier may use generate
shortened variable names randomly.

--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAKcBoku94n7aqPsw3AYTZu=i84drkT=YQP9aYW-enpyrGZfbTA@mail.gmail.com
 
Old 08-19-2012, 07:23 PM
Simon Josefsson
 
Default Minified javascript files

Pau Garcia i Quiles <pgquiles@elpauer.org> writes:

> On Sun, Aug 19, 2012 at 8:10 PM, Simon Josefsson <simon@josefsson.org> wrote:
>
>>> As for
>>> verification, having the source next to the minified version does not
>>> guarantee anything about the minified version, all the more that we
>>> don't have currently in Debian Wheezy a reliable minifier.
>>
>> That seems problematic -- so even if the source is shipped, there is no
>> way to re-build the minified file?
>
> It really depends on using exactly the same version of the same
> minifier with exactly the same parameters (which you may not know) and
> even then you cannot be sure, e. g. a minifier may use generate
> shortened variable names randomly.

I believe differences like that are not important, compare how gcc
generate different binaries each time depending on parameters etc.
However, if a minified file is shipped that cannot be re-created at all
(due to no minifier) I don't think shipping source for the file is the
only problem. Both source code and the tools needed to generate output
forms is needed for users to be able to use a modified version of the
program.

/Simon


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 877gsu4rfs.fsf@latte.josefsson.org">http://lists.debian.org/877gsu4rfs.fsf@latte.josefsson.org
 
Old 08-19-2012, 07:34 PM
Vincent Bernat
 
Default Minified javascript files

❦ 19 août 2012 20:10 CEST, Simon Josefsson <simon@josefsson.org>*:

>>> They are distributing files without source, so everyone else can either
>>> not just easily modify it or verify if it really does what it is
>>> supposed to do. This is definitely a shortcoming in what upstream ships
>>> and really something you should bug upstream about.
>>
>> The source is one link away. People wanting the source just have to
>> click on the link in the header of the minified version. As for
>> verification, having the source next to the minified version does not
>> guarantee anything about the minified version, all the more that we
>> don't have currently in Debian Wheezy a reliable minifier.
>
> That seems problematic -- so even if the source is shipped, there is no
> way to re-build the minified file?

Not in Debian Wheezy. The most up-to-date minifier, uglifyjs, has
suffered from the node.js name transition and is not currently available
in wheezy. Other minifiers (like yui-compressor) are considered not
reliable enough. Therefore, currently, we offer only uncompressed
version of jQuery.
--
Make sure special cases are truly special.
- The Elements of Programming Style (Kernighan & Plauger)
 
Old 08-19-2012, 07:51 PM
Jonas Smedegaard
 
Default Minified javascript files

On 12-08-19 at 08:10pm, Simon Josefsson wrote:
> Vincent Bernat <bernat@debian.org> writes:
>
> > ❦ 19 août 2012 15:11 CEST, "Bernhard R. Link" <brlink@debian.org>*:
> >
> >>> The difference is that we need to bug upstream about a file that we
> >>> won't even use. There is no real bug (not even a licensing issue).
> >>
> >> They are distributing files without source, so everyone else can either
> >> not just easily modify it or verify if it really does what it is
> >> supposed to do. This is definitely a shortcoming in what upstream ships
> >> and really something you should bug upstream about.
> >
> > The source is one link away. People wanting the source just have to
> > click on the link in the header of the minified version. As for
> > verification, having the source next to the minified version does not
> > guarantee anything about the minified version, all the more that we
> > don't have currently in Debian Wheezy a reliable minifier.
>
> That seems problematic -- so even if the source is shipped, there is no
> way to re-build the minified file?

In Wheezy we have the minifier yui-compressor which probably(!) doesn't
produce broken code but is not the most efficient at its job.

I say probably, because regression testing is uncommon, and the
environment for which is must work is often alien (e.g. compile on
Debian but run the code in Internet Explorer in Windows), so broken
JavaScript may go unnoticed for some time.

Because yui-compressor is not the most efficient at minifying, it
receives less testing, which also leads to potential bugs going
unnoticed for longer time.

For status of uglifyjs - the minifier used upstream for e.g. jQuery, see
http://bugs.debian.org/684044


Regards,

- Jonas

--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/

[x] quote me freely [ ] ask before reusing [ ] keep private
 
Old 08-20-2012, 07:28 AM
Thomas Goirand
 
Default Minified javascript files

On 08/19/2012 09:49 PM, Vincent Bernat wrote:
> As for
> verification, having the source next to the minified version does not
> guarantee anything about the minified version

Right, which is why we should build "from source" (eg: minify ourselves
the javascript libs).

> all the more that we
> don't have currently in Debian Wheezy a reliable minifier.
>

This is the first time I read this. have you tried yui-compressor?
Isn't it good enough?

Thomas


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 5031E72D.60201@debian.org">http://lists.debian.org/5031E72D.60201@debian.org
 
Old 08-20-2012, 07:31 AM
Thomas Goirand
 
Default Minified javascript files

On 08/20/2012 03:23 AM, Simon Josefsson wrote:
> I believe differences like that are not important, compare how gcc
> generate different binaries each time depending on parameters etc.
> However, if a minified file is shipped that cannot be re-created at all
> (due to no minifier) I don't think shipping source for the file is the
> only problem. Both source code and the tools needed to generate output
> forms is needed for users to be able to use a modified version of the
> program.
>
> /Simon
>
If it's that hard to produce a minified version, then shouldn't
we use the "normal" version? How much speed-up do we really
get anyway (my wild guess: not much...)?

Thomas


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 5031E7BE.80805@debian.org">http://lists.debian.org/5031E7BE.80805@debian.org
 
Old 08-20-2012, 07:33 AM
Thomas Goirand
 
Default Minified javascript files

On 08/20/2012 03:34 AM, Vincent Bernat wrote:
> Other minifiers (like yui-compressor) are considered not
> reliable enough.
Sorry that I asked you about this before reading this.

So, could you tell in what way yui-compressor isn't considered
not reliable enough? Does it crash? Or does it produce bad
minified scripts? In which case: in what way bad?

Thomas


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 5031E84C.7020500@debian.org">http://lists.debian.org/5031E84C.7020500@debian.org
 
Old 08-20-2012, 08:26 AM
 
Default Minified javascript files

On Aug 20, Thomas Goirand <zigo@debian.org> wrote:

> If it's that hard to produce a minified version, then shouldn't
> we use the "normal" version? How much speed-up do we really
No.

> get anyway (my wild guess: not much...)?
Very important, anybody who deals with web scalability knows that
javascript minification is one of the first and easier steps you take to
improve performance.

The current situation is just sad, and it reflects quite badly on the
viability on Debian as a serious OS.

--
ciao,
Marco
 
Old 08-20-2012, 06:49 PM
Vincent Bernat
 
Default Minified javascript files

❦ 20 août 2012 09:33 CEST, Thomas Goirand <zigo@debian.org>*:

>> Other minifiers (like yui-compressor) are considered not
>> reliable enough.
> Sorry that I asked you about this before reading this.
>
> So, could you tell in what way yui-compressor isn't considered
> not reliable enough? Does it crash? Or does it produce bad
> minified scripts? In which case: in what way bad?

It is not used anymore and is therefore less tested and less
trustworthy.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679665
--
panic("Detected a card I can't drive - whoops
");
2.2.16 /usr/src/linux/drivers/net/daynaport.c
 
Old 08-20-2012, 06:59 PM
Vincent Bernat
 
Default Minified javascript files

❦ 20 août 2012 09:31 CEST, Thomas Goirand <zigo@debian.org>*:

>> I believe differences like that are not important, compare how gcc
>> generate different binaries each time depending on parameters etc.
>> However, if a minified file is shipped that cannot be re-created at all
>
>> (due to no minifier) I don't think shipping source for the file is the
>> only problem. Both source code and the tools needed to generate output
>> forms is needed for users to be able to use a modified version of the
>> program.
>>
>> /Simon
>>
> If it's that hard to produce a minified version, then shouldn't
> we use the "normal" version? How much speed-up do we really
> get anyway (my wild guess: not much...)?

See:

$ ls -lh jquery*
-rw-r--r-- 1 bernat users 247K août 20 20:52 jquery.js
-rw-r--r-- 1 bernat users 81K août 20 20:52 jquery.js.gz
-rw-r--r-- 1 bernat users 93K août 20 20:53 jquery.min.js
-rw-r--r-- 1 bernat users 37K août 20 20:52 jquery.min.js.gz

A 44KB difference is pretty important for mobile users (which have poor
bandwidth and poor latency which makes bandwidth available at the
beginning of a TCP connection low).
--
Make sure your code "does nothing" gracefully.
- The Elements of Programming Style (Kernighan & Plauger)
 

Thread Tools




All times are GMT. The time now is 06:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org