On 10/26/10 04:24 PM, William Stein wrote:

Confusing users needlessly to save 30MB is not an option.
And people who seriously care about whether or not sage-x.y.z.tar is a
"source distribution" in some pure sense can (and do!) just delete
fortran.spkg.   Most users just care that whatever sage-x.y.z.tar is,
it "just works".

There is one other possible option, which should not confuse users, and would save at least 11.3 MB.

1) Add the compression program 'p7zip' as a standard package.

http://www.7-zip.org/

The source for this is 3.6 MB, so lets assume with the SPKG.txt, repository, spkg-install that becomes a 3.7 MB .spkg file.

(In fact, I suspect a lot of the source could be removed, as a lot of it is for a GUI we would not want).

2) Use p7zip to compress the binaries in the fortran package, rather than bzip2 which is what is currently used. (If you look in the package, you will see several tar .tar.bz2 files)

Using that compressor, the fortran package would then be 18 MB not 33 MB, as p7zip is a much better compressor.

33-18-3.7=11.3 MB

So we could save 11.3 MB.

Of course, with p7zip we could compress all the sources with a better compressor too, though the benefit of p7zip over bzip2 is much better with binaries.

As far as I can see, the spkg-install package has this line in it to decompress "file" which will be some .tar.bz2 file.

    if os.system('tar xvjf %s/%s'%(os.path.abspath(os.curdir), file)):

If that was changed, to a pipe with p7zip and tar, we could save about 11.3 MB.

Of course, with a better compressor in Sage, we could actually use it on every .spkg, though the savings would not be as substantial on packages containing just source. I'd guess we could probably save a few tens of MB though.

Dave


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to