After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 552868 - Compress Locations.xml files (?)
Compress Locations.xml files (?)
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: 2.22.0
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2008-09-19 07:14 UTC by Ildar
Modified: 2009-01-31 14:52 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to gzip Locations.xml files (5.96 KB, patch)
2008-10-28 04:06 UTC, Vincent Untz
committed Details | Review

Description Ildar 2008-09-19 07:14:21 UTC
% du -s /usr/share/libgweather
46M	/usr/share/libgweather
% ls /usr/share/libgweather | xargs -i bash -c "gzip -9 < /usr/share/libgweather/{} > {}"
% du -s .
8,0M	.
tar cjf /tmp/gwea.tb2 /usr/share/libgweather
% du -s /tmp/gwea.tb2
4,4M	/tmp/gwea.tb2

Bootomline:
There are ways to compress libgweather files. Definitely!
As (with the current GNOME installed), libgweather is one of the hugest packages, it's worthy to compress locations data.
Hint: use libz on the files.
Comment 1 Vincent Untz 2008-10-28 04:06:01 UTC
Created attachment 121495 [details] [review]
Patch to gzip Locations.xml files

It's relatively easy to compress all the data files.

Some data:

${datadir}/libgweather size (uncompressed): 77 MB
${datadir}/libgweather size (compressed): 14 MB

rpm size (uncompressed): 4 MB
rpm size (compressed): 14 MB

I didn't do any performance measure, but it doesn't feel slower when it's compressed.

I'm actually surprised the we lose that much in the package size. That's not that useful for distros if they want to create live cds...

Dan, what do you think?
Comment 2 Dan Winship 2008-10-28 14:35:03 UTC
(In reply to comment #1)
> rpm size (uncompressed): 4 MB
> rpm size (compressed): 14 MB

Um... I think you did something wrong. I'm getting 13.2M uncompressed and 13.5M compressed. (Maybe the uncompressed RPM you were comparing against used the single XML file instead of multiple?)

The patch looks good to me.
Comment 3 Vincent Untz 2008-10-28 15:12:46 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > rpm size (uncompressed): 4 MB
> > rpm size (compressed): 14 MB
> 
> Um... I think you did something wrong. I'm getting 13.2M uncompressed and 13.5M
> compressed. (Maybe the uncompressed RPM you were comparing against used the
> single XML file instead of multiple?)

Nope, it did contain the multiple files. But we're using lzma in openSUSE now, so that could explain the difference. I'm actually more surprised by your results than by mine :-)

Anyway, it's low maintenance, so I guess we can commit this. I prefer to aim at 2.25, but if you think it should be in 2.24, feel free to commit it now.
Comment 4 Dan Winship 2008-10-28 15:53:46 UTC
i'm fine with 2.25. and on that note, is there any reason to not branch now?
Comment 5 Vincent Untz 2008-11-25 21:18:47 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 6 Pacho Ramos 2009-01-31 09:46:56 UTC
Why do you prefer gzip over bzip2? Seems that bz2 compresses even more the files

Thanks for the info :-)
Comment 7 Vincent Untz 2009-01-31 12:28:52 UTC
(In reply to comment #6)
> Why do you prefer gzip over bzip2? Seems that bz2 compresses even more the
> files

Because libxml transparently does the gzip handling for us :-)
Comment 8 Dan Winship 2009-01-31 13:44:37 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Why do you prefer gzip over bzip2? Seems that bz2 compresses even more the
> > files
> 
> Because libxml transparently does the gzip handling for us :-)

And because the difference between gzip and bz2 in this case is fairly small.

Comment 9 Pacho Ramos 2009-01-31 14:52:28 UTC
OK, I didn't know that

Thanks :-D