GNOME Bugzilla – Bug 547961
/usr/share/libgweather/locations.xml is 17 megabytes!!!!
Last modified: 2008-08-15 22:07:43 UTC
For localized place names....... This is insane... oink, oink, oink... This is the sound of gnome starting up, reading 17 megabytes of XML, and parsing it, as gnome panel starts the time applet, which loads gweather, which, to provide cute logos of sunny, cloudy or other weather conditions on its display, reads this 17 megabyte file. And this is for 72 languages... There are > 350 languages of more than 1 million speakers in the world (ref:630 ethnologue). And we already have examples of smaller languages having been localized (e.g. icelandic, welsh). There are about 6000 languages spoken in the world today.... So just for the set of 350 languages, we can expect this file to grow to about 70 megabytes.... Can I suggest we have a better localization strategy? Pretty Please? Or we'll run out of RAM and die of old age starting up such features...
intltool makes this situation much worse than it needs to be. See these intltool bugs: http://bugzilla.gnome.org/show_bug.cgi?id=421155 http://bugzilla.gnome.org/show_bug.cgi?id=474987
Humm, why's mine only 1mb?
Since gweather is a service that requires internet anyway, can't it do its search, etc remotely and only store XXML info for user's configured locations?
$ rpm -qf /usr/share/libgweather/Locations.xml libgweather-2.23.6-1.fc10.i386 Also, why does it have such places like Constantine?! The representation also looks redundant. I don't know what each field means, but this certainly can be optimized: <city> <name>Constantine</name> <coordinates>36-21-54N 006-36-52E</coordinates> <location><name>Constantine</name><code>DABC</code><coordinates>36-16-59N 006-37E</coordinates></location> </city> Also, using more compact entity names can easily save some 30% to 50% it seems.
In 2.23, the default is to build a separate Locations.XX.xml for each language, rather than including all languages in a single file. Also, AFAIK, the clock does not read in Locations.xml until you open the Add/Edit location dialog.
(there are also other bugs about using a more compact representation in general)
*** Bug 161945 has been marked as a duplicate of this bug. ***