Bug 17606 - Eliminate duplicate open cairo_font_face_t
Summary: Eliminate duplicate open cairo_font_face_t
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-16 05:32 UTC by Chris Wilson
Modified: 2008-09-21 07:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Check for duplicate open fonts (8.60 KB, patch)
2008-09-16 05:32 UTC, Chris Wilson
Details | Splinter Review

Description Chris Wilson 2008-09-16 05:32:30 UTC
Created attachment 18920 [details] [review]
Check for duplicate open fonts

When loading multiple PDFs the font streams are often copies of fonts kept alive in the caches. By keeping a list of open fonts faces, we can scan for duplicates - the number of open faces should remain small, so a simple list is sufficient - and return a reference to the existing cached font instead of creating a new FT_Face.

As an example, this reduces the RSS of the Poppler converter in the Cairo test suite from over 900MiB to just 90MiB.
Comment 1 Carlos Garcia Campos 2008-09-21 07:53:37 UTC
Applied, thank you very much Chris. 


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.