Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce figure file size #1950

Closed
TGlas opened this issue Mar 30, 2020 · 5 comments
Closed

reduce figure file size #1950

TGlas opened this issue Mar 30, 2020 · 5 comments
Assignees

Comments

@TGlas
Copy link

TGlas commented Mar 30, 2020

I just submitted a paper containing 28 COCO figures to arXiv, and it turns out that the paper is oversized by their standards (10MB limit). The PDF figures are all between 300K and 500K in size, with four curves per plot (four algorithms). That's a huge file size for a few curves plus coordinate system and decoration. The SVG-Files are 4 to 5 times smaller than the PDFs, although they are uncompressed. That's a huge mismatch. There must be some inefficiency in the PDF generation procedure.

@nikohansen
Copy link
Contributor

One way to go about this may be to use rasterized=True when plotting. This would need some investigation how easily this can be done and how effective it is.

@nikohansen
Copy link
Contributor

Meanwhile, @ttusar and @brockho figured out the reason: fonts are included in the pdfs (as it seemed to be necessary for GECCO submissions). This will be fixed in the coming days.

@TGlas
Copy link
Author

TGlas commented Apr 1, 2020

Thanks for looking into this. It seems safe to use only Helvetica in the plots, or one of the other four standard postscript fonts. As far as I know there is no need to embed these. To make GECCO happy, embedding only the characters that are actually needed should solve it, too.In any case, embedding the same font 28 times is far from ideal :)

@nikohansen
Copy link
Contributor

In any case, embedding the same font 28 times is far from ideal

Right, and now I also understand how pdf down-sizing can be so amazingly effective and loss less: just remove 27 of the 28 copies :-)

brockho added a commit that referenced this issue Apr 26, 2020
Fonts are not included anymore by default, but the new --include-fonts option allows to prepare ACM-style compliant figures as before
@brockho
Copy link
Contributor

brockho commented Apr 28, 2020

Eventually, we solved all "problems" with the continuous integration tests such that the suggested default removal of the fonts to reduce the pdf file size is now effective in the development branch (and soon in a new release).

The new --include-fonts option of the postprocessing allows now to include the fonts into the generated PDFs such that the COCO/BBOB LaTeX submissions are ACM compatible (for example as needed for the BBOB workshop submissions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants