From: Pascal B. <pb...@oi...> - 2000-12-08 11:49:18
|
Not to be raving on anybodys parade, but whitespace compressions isn't really worth it is it? You only stripped about 4kb off the complete api/ folder (dynlayer,dyndocument,etc..) if you remove all comments and semi-colons from the un-"compressed" files, you will probably end up with even less "compression". I know that compression on all widgets might give more advantage, but then again when will you be actually using all widgets? I think the jar and gzip are great, but jar won't work in IE, and I don't think gzip works in ie4 (and how about IE on Macs?) Am I missing some advantage in this? Pascal Bestebroer pb...@oi... http://www.oibv.com |
From: Dan S. <dy...@fu...> - 2000-12-08 15:05:49
|
Pascal, initially I wasn't so hot to trot with whitespace compression either, but after playing around with it it's really quite cool, and I'm glad I put in the time to create my little jspack util. If you check again, the compression ratio is closer to about 30%, more or less depending on how many comments you put in there. All the /api/ files were "manually" compress. I don't particularly enjoy reading code that is like this: if(b)c=2 else if(a&&b||c&&d<=4)method() else {method();return false} And with the system set up now, we won't have to. You just write your code, putting in all the comments and whitespace you want, and (as long as the ;'s are correct) it will all be squished down for you in a build release. Also, jspack compresses stuff that gzip/jar's can't do much with, like the following: if (a) { } else if (b || c) { } The spaces and line breaks have to be maintained. But in a jspacked version: if(a){}else if(b||c){} It's already taken care of. After you jspack, and jar/gzip it, you're up to over 80% compression (85% for dynapi2 currently). Whereas gzip on it's own can only do about 60%. Plus by whitespace compression, each individual file can be compressed, whereas there's no point in having an individual gzip/jar file for each js file because you don't gain much in small files. Another thing that's kinda cool, imagine when you build a game, or standalone app in JS. When you want to release the app to the public, you can build your own JS pack file with the code you need all in there (GPL license allows u to do this if the program you wrote is also GPL). I'm rewriting my tetris game, so I'd make a jspack for it with: jspack -o tetris-packed.js tetris.js ../dynapi/dynapi.js ../dynapi/api/ ../dynapi/gui/image.js That produces a single js file with all the code I need squished together. This is an ideal way to publish js apps or games IMO because you no longer need to include the entire dynapi with your app (or copy select files along . Dan On Fri, Dec 08, 2000 at 12:49:06PM +0100, Pascal Bestebroer wrote: > Not to be raving on anybodys parade, but whitespace compressions isn't > really worth it is it? You only stripped about 4kb off the complete api/ > folder (dynlayer,dyndocument,etc..) if you remove all comments and > semi-colons from the un-"compressed" files, you will probably end up with > even less "compression". > > I know that compression on all widgets might give more advantage, but then > again when will you be actually using all widgets? > > I think the jar and gzip are great, but jar won't work in IE, and I don't > think gzip works in ie4 (and how about IE on Macs?) > > Am I missing some advantage in this? > > > > Pascal Bestebroer > pb...@oi... > http://www.oibv.com > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Robert R. <rra...@ya...> - 2000-12-08 17:27:18
|
One thing I don't understand are the JAR and gzip compressed files. It seems there are very little cases where you could use them. Most users will see these files and not know what to do with them. I'm not sure that the gzipped files even work in IE 5 (they don't seem to). Aren't those files something that users could create themselves in the rare case that they would need them. -- // Robert Rainwater On 12/8/2000, 3:33:12 PM EST, Dan wrote about "[Dynapi-Dev] compression?": > Pascal, initially I wasn't so hot to trot with whitespace compression either, but after playing around with it it's really quite cool, and I'm glad I put in the time to create my little jspack > util. If you check again, the compression ratio is closer to about 30%, more or less depending on how many comments you put in there. All the /api/ files were "manually" compress. I don't > particularly enjoy reading code that is like this: > if(b)c=2 > else if(a&&b||c&&d<=4)method() > else {method();return false} > And with the system set up now, we won't have to. You just write your code, putting in all the comments and whitespace you want, and (as long as the ;'s are correct) it will all be squished down > for you in a build release. > Also, jspack compresses stuff that gzip/jar's can't do much with, like the following: > if (a) { > } > else if (b || c) { > } > The spaces and line breaks have to be maintained. But in a jspacked version: > if(a){}else if(b||c){} > It's already taken care of. After you jspack, and jar/gzip it, you're up to over 80% compression (85% for dynapi2 currently). Whereas gzip on it's own can only do about 60%. Plus by whitespace > compression, each individual file can be compressed, whereas there's no point in having an individual gzip/jar file for each js file because you don't gain much in small files. > Another thing that's kinda cool, imagine when you build a game, or standalone app in JS. When you want to release the app to the public, you can build your own JS pack file with the code you need > all in there (GPL license allows u to do this if the program you wrote is also GPL). I'm rewriting my tetris game, so I'd make a jspack for it with: > jspack -o tetris-packed.js tetris.js ../dynapi/dynapi.js ../dynapi/api/ ../dynapi/gui/image.js > That produces a single js file with all the code I need squished together. This is an ideal way to publish js apps or games IMO because you no longer need to include the entire dynapi with your > app (or copy select files along . > Dan > On Fri, Dec 08, 2000 at 12:49:06PM +0100, Pascal Bestebroer wrote: >> Not to be raving on anybodys parade, but whitespace compressions isn't >> really worth it is it? You only stripped about 4kb off the complete api/ >> folder (dynlayer,dyndocument,etc..) if you remove all comments and >> semi-colons from the un-"compressed" files, you will probably end up with >> even less "compression". >> >> I know that compression on all widgets might give more advantage, but then >> again when will you be actually using all widgets? >> >> I think the jar and gzip are great, but jar won't work in IE, and I don't >> think gzip works in ie4 (and how about IE on Macs?) >> >> Am I missing some advantage in this? >> >> >> >> Pascal Bestebroer >> pb...@oi... >> http://www.oibv.com >> >> _______________________________________________ >> Dynapi-Dev mailing list >> Dyn...@li... >> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Joachim L. <lu...@ho...> - 2000-12-08 18:57:48
|
There is a good article about gzip encoding: http://www.webreference.com/internet/software/servers/http/compression/ Meaning: you should still reference the .js file - if the server can send the .js.gz file (according to headers in the client request) it tries to do so. (I left out the discussion about the JAR file which is a totally different matter.) /Lunna At 2000-12-08 18:30 , you wrote: > >One thing I don't understand are the JAR and gzip compressed files. It >seems there are very little cases where you could use them. Most users >will see these files and not know what to do with them. I'm not sure >that the gzipped files even work in IE 5 (they don't seem to). Aren't >those files something that users could create themselves in the rare >case that they would need them. > >-- >// Robert Rainwater |
From: Alexey M. <ma...@ca...> - 2000-12-09 11:24:59
|
> One thing I don't understand are the JAR and gzip compressed files. It > seems there are very little cases where you could use them. Most users Why? > that the gzipped files even work in IE 5 (they don't seem to). Aren't If you will put them to Apache Web Server (and other imho). Server will send header: Content-Encoding: gzip IE5 understands it. Malx |
From: Brandon M. <bnd...@ho...> - 2000-12-09 19:08:16
|
Will netscape understand it as well? ----- Original Message ----- From: "Alexey Medvedev" <ma...@ca...> To: "DynAPI Development List" <dyn...@li...> Sent: Saturday, December 09, 2000 6:23 AM Subject: Re: Re[2]: [Dynapi-Dev] compression? > > One thing I don't understand are the JAR and gzip compressed files. It > > seems there are very little cases where you could use them. Most users > > Why? > > > that the gzipped files even work in IE 5 (they don't seem to). Aren't > > If you will put them to Apache Web Server (and other imho). > Server will send header: > Content-Encoding: gzip > IE5 understands it. > > Malx > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Pascal B. <pa...@dy...> - 2000-12-09 19:42:38
|
also, note that not everybody has access to how there server is setup (and what encoding/mime types it supports etc..) Same with using JAR and gzip, not every one has the freedom to use those file types (I personally have never seen it being used on websites) The other thing I wanted to mention is the fact that the current distribution contains alot of files, it might not be clear enough to which files someone should use. Should the release version contain all these packed files aswell? It might hold people back from using it when there are other, more simple looking, api's/libraries available. Pascal Bestebroer pa...@dy... http://www.dynamic-core.net > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Brandon Myers > Verzonden: zaterdag 9 december 2000 20:10 > Aan: dyn...@li... > Onderwerp: Re: Re[2]: [Dynapi-Dev] compression? > > > Will netscape understand it as well? > > ----- Original Message ----- > From: "Alexey Medvedev" <ma...@ca...> > To: "DynAPI Development List" <dyn...@li...> > Sent: Saturday, December 09, 2000 6:23 AM > Subject: Re: Re[2]: [Dynapi-Dev] compression? > > > > > One thing I don't understand are the JAR and gzip compressed files. It > > > seems there are very little cases where you could use them. Most users > > > > Why? > > > > > that the gzipped files even work in IE 5 (they don't seem to). Aren't > > > > If you will put them to Apache Web Server (and other imho). > > Server will send header: > > Content-Encoding: gzip > > IE5 understands it. > > > > Malx > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > |
From: Robert R. <rra...@ya...> - 2000-12-09 22:53:58
|
Right now, we can't include any of the compressed files in the next release, until they are fixed. There seems to be a bug in jspack that causes some spaces to be removed when they shouldn't (see my other post). I guess the next release will not include the compressed files until that bug is fixed. I'm sure there are some semicolon problems too, although these can be easily fixed. I think including all of the gzip and jar files it will be confusing as well. I really like the jspack compression, but I think the gzip and jar files can be confusing. Also, I think they shouldnt be included in the release, because if somebody is smart enough to know how to use them, then they will be smart enough to able to create them themselves, especially with the makefile that is included. -- // Robert Rainwater On 12/9/2000, 2:46:16 PM EST, Pascal wrote about "[Dynapi-Dev] compression?": > also, note that not everybody has access to how there server is setup (and > what encoding/mime types it supports etc..) > Same with using JAR and gzip, not every one has the freedom to use those > file types (I personally have never seen it being used on websites) > The other thing I wanted to mention is the fact that the current > distribution contains alot of files, it might not be clear enough to which > files someone should use. Should the release version contain all these > packed files aswell? It might hold people back from using it when there are > other, more simple looking, api's/libraries available. > Pascal Bestebroer > pa...@dy... > http://www.dynamic-core.net >> -----Oorspronkelijk bericht----- >> Van: dyn...@li... >> [mailto:dyn...@li...]Namens Brandon Myers >> Verzonden: zaterdag 9 december 2000 20:10 >> Aan: dyn...@li... >> Onderwerp: Re: Re[2]: [Dynapi-Dev] compression? >> >> >> Will netscape understand it as well? >> >> ----- Original Message ----- >> From: "Alexey Medvedev" <ma...@ca...> >> To: "DynAPI Development List" <dyn...@li...> >> Sent: Saturday, December 09, 2000 6:23 AM >> Subject: Re: Re[2]: [Dynapi-Dev] compression? >> >> >> > > One thing I don't understand are the JAR and gzip compressed files. It >> > > seems there are very little cases where you could use them. Most users >> > >> > Why? >> > >> > > that the gzipped files even work in IE 5 (they don't seem to). Aren't >> > >> > If you will put them to Apache Web Server (and other imho). >> > Server will send header: >> > Content-Encoding: gzip >> > IE5 understands it. >> > >> > Malx >> > >> > _______________________________________________ >> > Dynapi-Dev mailing list >> > Dyn...@li... >> > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev >> >> _______________________________________________ >> Dynapi-Dev mailing list >> Dyn...@li... >> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev >> > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Jorge L. <jo...@ne...> - 2000-12-10 01:11:47
|
Every HTTP 1.1 compliant browser can understand gzip encoding. Best Regards, Jorge C. ----- Original Message ----- From: Brandon Myers <bnd...@ho...> To: <dyn...@li...> Sent: Saturday, December 09, 2000 1:10 PM Subject: Re: Re[2]: [Dynapi-Dev] compression? > Will netscape understand it as well? > > ----- Original Message ----- > From: "Alexey Medvedev" <ma...@ca...> > To: "DynAPI Development List" <dyn...@li...> > Sent: Saturday, December 09, 2000 6:23 AM > Subject: Re: Re[2]: [Dynapi-Dev] compression? > > > > > One thing I don't understand are the JAR and gzip compressed files. It > > > seems there are very little cases where you could use them. Most users > > > > Why? > > > > > that the gzipped files even work in IE 5 (they don't seem to). Aren't > > > > If you will put them to Apache Web Server (and other imho). > > Server will send header: > > Content-Encoding: gzip > > IE5 understands it. > > > > Malx > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > > |
From: Robert R. <rra...@ya...> - 2000-12-10 01:42:29
|
I don't think that totally correct. It depends on how the server handles gzip. Try loading a gziped js file in IE 5 locally. It doesn't work. -- // Robert Rainwater On 12/9/2000, 8:11:42 PM EST, Jorge wrote about "[Dynapi-Dev] compression?": > Every HTTP 1.1 compliant browser can understand gzip encoding. > Best Regards, > Jorge C. > ----- Original Message ----- > From: Brandon Myers <bnd...@ho...> > To: <dyn...@li...> > Sent: Saturday, December 09, 2000 1:10 PM > Subject: Re: Re[2]: [Dynapi-Dev] compression? >> Will netscape understand it as well? >> >> ----- Original Message ----- >> From: "Alexey Medvedev" <ma...@ca...> >> To: "DynAPI Development List" <dyn...@li...> >> Sent: Saturday, December 09, 2000 6:23 AM >> Subject: Re: Re[2]: [Dynapi-Dev] compression? >> >> >> > > One thing I don't understand are the JAR and gzip compressed files. It >> > > seems there are very little cases where you could use them. Most users >> > >> > Why? >> > >> > > that the gzipped files even work in IE 5 (they don't seem to). Aren't >> > >> > If you will put them to Apache Web Server (and other imho). >> > Server will send header: >> > Content-Encoding: gzip >> > IE5 understands it. >> > >> > Malx >> > >> > _______________________________________________ >> > Dynapi-Dev mailing list >> > Dyn...@li... >> > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev >> >> _______________________________________________ >> Dynapi-Dev mailing list >> Dyn...@li... >> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev >> >> >> > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Jorge L. <jo...@ne...> - 2000-12-10 02:37:44
|
Thats right. the server has to send content header telling the browser that it is gzip encoded. Best Regards, Jorge C. ----- Original Message ----- From: Robert Rainwater <rra...@ya...> To: DynAPI Development List <dyn...@li...> Sent: Saturday, December 09, 2000 7:44 PM Subject: Re[4]: [Dynapi-Dev] compression? > > I don't think that totally correct. It depends on how the server > handles gzip. Try loading a gziped js file in IE 5 locally. It > doesn't work. > > -- > // Robert Rainwater > > On 12/9/2000, 8:11:42 PM EST, Jorge wrote about "[Dynapi-Dev] compression?": > > > Every HTTP 1.1 compliant browser can understand gzip encoding. > > > Best Regards, > > > Jorge C. > > > ----- Original Message ----- > > From: Brandon Myers <bnd...@ho...> > > To: <dyn...@li...> > > Sent: Saturday, December 09, 2000 1:10 PM > > Subject: Re: Re[2]: [Dynapi-Dev] compression? > > > >> Will netscape understand it as well? > >> > >> ----- Original Message ----- > >> From: "Alexey Medvedev" <ma...@ca...> > >> To: "DynAPI Development List" <dyn...@li...> > >> Sent: Saturday, December 09, 2000 6:23 AM > >> Subject: Re: Re[2]: [Dynapi-Dev] compression? > >> > >> > >> > > One thing I don't understand are the JAR and gzip compressed files. It > >> > > seems there are very little cases where you could use them. Most users > >> > > >> > Why? > >> > > >> > > that the gzipped files even work in IE 5 (they don't seem to). Aren't > >> > > >> > If you will put them to Apache Web Server (and other imho). > >> > Server will send header: > >> > Content-Encoding: gzip > >> > IE5 understands it. > >> > > >> > Malx > >> > > >> > _______________________________________________ > >> > Dynapi-Dev mailing list > >> > Dyn...@li... > >> > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > >> > >> _______________________________________________ > >> Dynapi-Dev mailing list > >> Dyn...@li... > >> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > >> > >> > >> > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > |
From: Robert R. <rra...@ya...> - 2000-12-10 02:55:30
|
Thats why I don't think the gzip and jars need to be in the release. I tested a simple gzip file on Netscape Enterprise Server and it did not work. -- // Robert Rainwater On 12/9/2000, 9:37:53 PM EST, Jorge wrote about "[Dynapi-Dev] compression?": > Thats right. > the server has to send content header telling the browser that it is gzip > encoded. > Best Regards, > Jorge C. > ----- Original Message ----- > From: Robert Rainwater <rra...@ya...> > To: DynAPI Development List <dyn...@li...> > Sent: Saturday, December 09, 2000 7:44 PM > Subject: Re[4]: [Dynapi-Dev] compression? >> >> I don't think that totally correct. It depends on how the server >> handles gzip. Try loading a gziped js file in IE 5 locally. It >> doesn't work. >> >> -- >> // Robert Rainwater >> >> On 12/9/2000, 8:11:42 PM EST, Jorge wrote about "[Dynapi-Dev] > compression?": >> >> > Every HTTP 1.1 compliant browser can understand gzip encoding. >> >> > Best Regards, >> >> > Jorge C. >> >> > ----- Original Message ----- >> > From: Brandon Myers <bnd...@ho...> >> > To: <dyn...@li...> >> > Sent: Saturday, December 09, 2000 1:10 PM >> > Subject: Re: Re[2]: [Dynapi-Dev] compression? >> >> >> >> Will netscape understand it as well? >> >> >> >> ----- Original Message ----- >> >> From: "Alexey Medvedev" <ma...@ca...> >> >> To: "DynAPI Development List" <dyn...@li...> >> >> Sent: Saturday, December 09, 2000 6:23 AM >> >> Subject: Re: Re[2]: [Dynapi-Dev] compression? >> >> >> >> >> >> > > One thing I don't understand are the JAR and gzip compressed files. > It >> >> > > seems there are very little cases where you could use them. Most > users >> >> > >> >> > Why? >> >> > >> >> > > that the gzipped files even work in IE 5 (they don't seem to). > Aren't >> >> > >> >> > If you will put them to Apache Web Server (and other imho). >> >> > Server will send header: >> >> > Content-Encoding: gzip >> >> > IE5 understands it. >> >> > >> >> > Malx >> >> > >> >> > _______________________________________________ >> >> > Dynapi-Dev mailing list >> >> > Dyn...@li... >> >> > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev >> >> >> >> _______________________________________________ >> >> Dynapi-Dev mailing list >> >> Dyn...@li... >> >> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev >> >> >> >> >> >> >> >> > _______________________________________________ >> > Dynapi-Dev mailing list >> > Dyn...@li... >> > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev >> >> >> _______________________________________________ >> Dynapi-Dev mailing list >> Dyn...@li... >> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev >> >> > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Pascal B. <pa...@dy...> - 2000-12-08 18:19:03
|
As I said, I might be missing the advantage here, but having one short file would indeed make it easy to distribute things.. still I don't think jar and gzip are of any use if not all browser can handle them safely. I know you could use a combination of JAR for NS and gzip for IE5+ and a js file for ie4, but personally I don't see the usage of it ;) maybe I should give it a closer look and, very maybe, I'll make a win32 app to do the jspacking because using that perl stuff is to linux for me :) Pascal Bestebroer pa...@dy... http://www.dynamic-core.net > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Dan Steinman > Verzonden: vrijdag 8 december 2000 21:33 > Aan: dyn...@li... > Onderwerp: Re: [Dynapi-Dev] compression? > > > Pascal, initially I wasn't so hot to trot with whitespace > compression either, but after playing around with it it's really > quite cool, and I'm glad I put in the time to create my little > jspack util. If you check again, the compression ratio is closer > to about 30%, more or less depending on how many comments you put > in there. All the /api/ files were "manually" compress. I don't > particularly enjoy reading code that is like this: > > if(b)c=2 > else if(a&&b||c&&d<=4)method() > else {method();return false} > > And with the system set up now, we won't have to. You just write > your code, putting in all the comments and whitespace you want, > and (as long as the ;'s are correct) it will all be squished down > for you in a build release. > > Also, jspack compresses stuff that gzip/jar's can't do much with, > like the following: > > if (a) { > > } > else if (b || c) { > > } > > The spaces and line breaks have to be maintained. But in a > jspacked version: > > if(a){}else if(b||c){} > > It's already taken care of. After you jspack, and jar/gzip it, > you're up to over 80% compression (85% for dynapi2 currently). > Whereas gzip on it's own can only do about 60%. Plus by > whitespace compression, each individual file can be compressed, > whereas there's no point in having an individual gzip/jar file > for each js file because you don't gain much in small files. > > Another thing that's kinda cool, imagine when you build a game, > or standalone app in JS. When you want to release the app to the > public, you can build your own JS pack file with the code you > need all in there (GPL license allows u to do this if the program > you wrote is also GPL). I'm rewriting my tetris game, so I'd > make a jspack for it with: > > jspack -o tetris-packed.js tetris.js ../dynapi/dynapi.js > ../dynapi/api/ ../dynapi/gui/image.js > > That produces a single js file with all the code I need squished > together. This is an ideal way to publish js apps or games IMO > because you no longer need to include the entire dynapi with your > app (or copy select files along . > > Dan > > > On Fri, Dec 08, 2000 at 12:49:06PM +0100, Pascal Bestebroer wrote: > > Not to be raving on anybodys parade, but whitespace compressions isn't > > really worth it is it? You only stripped about 4kb off the > complete api/ > > folder (dynlayer,dyndocument,etc..) if you remove all comments and > > semi-colons from the un-"compressed" files, you will probably > end up with > > even less "compression". > > > > I know that compression on all widgets might give more > advantage, but then > > again when will you be actually using all widgets? > > > > I think the jar and gzip are great, but jar won't work in IE, > and I don't > > think gzip works in ie4 (and how about IE on Macs?) > > > > Am I missing some advantage in this? > > > > > > > > Pascal Bestebroer > > pb...@oi... > > http://www.oibv.com > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > |
From: Dan S. <dy...@fu...> - 2000-12-09 15:56:34
|
When we release a "stable" version, it will already come with all the packed versions of the js files. So even if you just want to use the individual files. I'll fix any bugs that exist in jspack until it's rock solid, and can be used reliably. Also for the jar/gzips, they are completely optional. The include() method could be alterted so that it could seamlessly include those files, when you do this: DynAPI.include(dynapi.api.*); // it'll include the .jar instead Or something like that. I'll play around with that once the jars are fully working. Dan On Fri, Dec 08, 2000 at 07:22:31PM +0100, Pascal Bestebroer wrote: > As I said, I might be missing the advantage here, but having one short file > would indeed make it easy to distribute things.. still I don't think jar and > gzip are of any use if not all browser can handle them safely. I know you > could use a combination of JAR for NS and gzip for IE5+ and a js file for > ie4, but personally I don't see the usage of it ;) > > maybe I should give it a closer look and, very maybe, I'll make a win32 app > to do the jspacking because using that perl stuff is to linux for me :) > > > > Pascal Bestebroer > pa...@dy... > http://www.dynamic-core.net > > > -----Oorspronkelijk bericht----- > > Van: dyn...@li... > > [mailto:dyn...@li...]Namens Dan Steinman > > Verzonden: vrijdag 8 december 2000 21:33 > > Aan: dyn...@li... > > Onderwerp: Re: [Dynapi-Dev] compression? > > > > > > Pascal, initially I wasn't so hot to trot with whitespace > > compression either, but after playing around with it it's really > > quite cool, and I'm glad I put in the time to create my little > > jspack util. If you check again, the compression ratio is closer > > to about 30%, more or less depending on how many comments you put > > in there. All the /api/ files were "manually" compress. I don't > > particularly enjoy reading code that is like this: > > > > if(b)c=2 > > else if(a&&b||c&&d<=4)method() > > else {method();return false} > > > > And with the system set up now, we won't have to. You just write > > your code, putting in all the comments and whitespace you want, > > and (as long as the ;'s are correct) it will all be squished down > > for you in a build release. > > > > Also, jspack compresses stuff that gzip/jar's can't do much with, > > like the following: > > > > if (a) { > > > > } > > else if (b || c) { > > > > } > > > > The spaces and line breaks have to be maintained. But in a > > jspacked version: > > > > if(a){}else if(b||c){} > > > > It's already taken care of. After you jspack, and jar/gzip it, > > you're up to over 80% compression (85% for dynapi2 currently). > > Whereas gzip on it's own can only do about 60%. Plus by > > whitespace compression, each individual file can be compressed, > > whereas there's no point in having an individual gzip/jar file > > for each js file because you don't gain much in small files. > > > > Another thing that's kinda cool, imagine when you build a game, > > or standalone app in JS. When you want to release the app to the > > public, you can build your own JS pack file with the code you > > need all in there (GPL license allows u to do this if the program > > you wrote is also GPL). I'm rewriting my tetris game, so I'd > > make a jspack for it with: > > > > jspack -o tetris-packed.js tetris.js ../dynapi/dynapi.js > > ../dynapi/api/ ../dynapi/gui/image.js > > > > That produces a single js file with all the code I need squished > > together. This is an ideal way to publish js apps or games IMO > > because you no longer need to include the entire dynapi with your > > app (or copy select files along . > > > > Dan > > > > > > On Fri, Dec 08, 2000 at 12:49:06PM +0100, Pascal Bestebroer wrote: > > > Not to be raving on anybodys parade, but whitespace compressions isn't > > > really worth it is it? You only stripped about 4kb off the > > complete api/ > > > folder (dynlayer,dyndocument,etc..) if you remove all comments and > > > semi-colons from the un-"compressed" files, you will probably > > end up with > > > even less "compression". > > > > > > I know that compression on all widgets might give more > > advantage, but then > > > again when will you be actually using all widgets? > > > > > > I think the jar and gzip are great, but jar won't work in IE, > > and I don't > > > think gzip works in ie4 (and how about IE on Macs?) > > > > > > Am I missing some advantage in this? > > > > > > > > > > > > Pascal Bestebroer > > > pb...@oi... > > > http://www.oibv.com > > > > > > _______________________________________________ > > > Dynapi-Dev mailing list > > > Dyn...@li... > > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |