Control: tag -1 patch Hi!
On Fri, 2014-07-18 at 01:07:49 +0200, Michael Biebl wrote: > Package: graphviz > Version: 2.38.0-3 > Severity: important > > The old 2.26 graphviz package weighed around 900K, the update to 2.38 > want's to pull and additional 62M (yeah, Megabyte). That means a 70x > size increase. > > That doesn't look normal. Especially since the changelog doesn't list > anything relevant which would warrant that increase in size. > Graphviz is recommended by a lot of packages, which means it will be > installed for a lot of people. > Therefore please consider trimming down the size again. Yeah, I also saw that on upgrade, and thought it was ridiculous, after having checked the source code I find it even more ridiculous. The code is embedding a massive vector table of doubles (20 MiB .o) into three different programs (so the additional 60 MiB), instead of either computing the table at run-time, using a single binary data file to store the table, or placing it inside a shared library or plugin, and of course using a way more adequate data type for the involved data. I'm attaching a patch for the latter which is a workaround, that at least reduces the size in one order of magnitude, so from 60 MiB to 6 MiB. Which is an improvement, but the underlaying issue should be fixed in a better way, really Also the new release adds extremely generic program names, like cluster or unflatten. :/ Thanks, Guillem
Description: Use a signed char instead of a double for lab_struct The massive data structure was using a double for each struct member, which makes the resulting object extremely large. By switching it to a signed char we reduce the size from around 20 MiB to 2.5 MiB, so an order of magnitude. The new data type should be fine as the number literals do not exceed the type range. . In any case this gets embedded into at least three binaries, one of which contais an extremely generic filename(!). Which is still rather ridiculous as this should most possibly be computable at run-time, or stored in a shared data file, or in a single shared library or plugin. Author: Guillem Jover <guil...@debian.org> Origin: vendor Bug-Debian: Forwarded: no Last-Update: 2014-07-18 --- --- graphviz-2.38.0.orig/lib/edgepaint/lab.h +++ graphviz-2.38.0/lib/edgepaint/lab.h @@ -21,7 +21,7 @@ struct xyz_struct { typedef struct xyz_struct color_xyz; struct lab_struct { - double l, a, b;/* l: 0 to 100, a,b: -128 tp 128 */ + signed char l, a, b;/* l: 0 to 100, a,b: -128 tp 128 */ }; typedef struct lab_struct color_lab;