ghostscript: slim down driver selection? |
||||||
Issue description
Random question: do we know how many of Ghostscript's are really used in CrOS? I see that today, we just build with --drivers=ALL, and if I just restrict that to --drivers=PS I save >5MB in libgs.so.* alone (~12M -> ~5M on Coral). But I don't think that's the extent of the drivers we use, and I don't know about plans to utilize more of those long-term.
For reference:
$ ./configure --help
...
--with-drivers=LIST Drivers to support, separated by commas.
Either list the drivers or use aliases:
ALL = all drivers
FILES = all file format drivers
PRINTERS = all printer drivers
Printers:
APPLE = all Apple printers
BROTHER = all Brother printers
CANON = all Canon printers
EPSON = all Epson printers
HP = all HP printers
IBM = all IBM printers
JAPAN = older japanese printers
LEXMARK = all Lexmark printers
OKI = all OKI printers
PCLXL = all PCL XL/6 printers
File formats:
BMP = Output to bmp files
FAX = Output to fax files
JPEG = Output to JPEG files
PBM = Output to PBM/PNM
PCX = Output to PCX
PNG = Output to PNG
PS = Output to PostScript/PDF
TIFF = Output to TIFF
You can mix both variants, e.g.
--with-drivers=HP,stcolor would build HP drivers and
the Epson stcolor driver.
Aliases must be uppercase (a 3rd party driver might
have the same name).
Default: ALL
I ask, partly because of bugs like bug 888744. But if this is a significant maintenance burden (e.g., we want to allow any of these through custom PPDs, etc.), perhaps it's not worth poking too hard at (and I'd be satisfied with a WontFix).
,
Oct 18
IF gs is used only by CUPS filters (PPD files) && this option can accept list of drivers THEN I can get a list of used gs drivers from logs created by platform_PrinterPpds and then I can try to set is as a value of parameter --with-drivers= for ./configure. I can try to do this when gs-9.25 will be eventually merged.
,
Oct 18
That's a great idea actually. Please do that! If you write a script to parse through the logs, we should find somewhere to keep it.
,
Oct 18
,
Oct 22
,
Oct 24
Aren't we waiting for the CL to land still?
,
Oct 24
,
Oct 27
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/d0bdd222ca6fae6d07b658e5f2a49d80a29f061e commit d0bdd222ca6fae6d07b658e5f2a49d80a29f061e Author: Piotr Pawliczek <pawliczek@chromium.org> Date: Sat Oct 27 00:19:01 2018 ghostscript: Limit the number of drivers compiled in Ghostscript includes many optional drivers (devices) compiled in. To decrease the size of ghostscript binaries we want to limit the number of these drivers. This patch changes a value of --with-drivers parameter passed to ./configure script from "ALL" to comma-separated list of drivers used by CUPS/PPD files. The list was built basing on output from platform_PrinterPpds autotest. See the readme.txt file in the autotest directory to learn how to build this kind of list. BUG= chromium:896335 TEST=Tested on nautilus and veyron_minnie Change-Id: I151ca087c39817b5c27f05bdebea56572dd821f1 Reviewed-on: https://chromium-review.googlesource.com/1292530 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Piotr Pawliczek <pawliczek@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [rename] https://crrev.com/d0bdd222ca6fae6d07b658e5f2a49d80a29f061e/app-text/ghostscript-gpl/ghostscript-gpl-9.25-r2.ebuild [modify] https://crrev.com/d0bdd222ca6fae6d07b658e5f2a49d80a29f061e/app-text/ghostscript-gpl/ghostscript-gpl-9.25.ebuild
,
Oct 27
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by skau@chromium.org
, Oct 18Status: Available (was: Untriaged)