[cairo-bugs] [Bug 102481] New: PDF creation memory usage

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Aug 30 14:43:45 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=102481

            Bug ID: 102481
           Summary: PDF creation memory usage
           Product: cairo
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: pdf backend
          Assignee: ajohnson at redneon.com
          Reporter: tteveris at gerberscientific.com
        QA Contact: cairo-bugs at cairographics.org

Created attachment 133883
  --> https://bugs.freedesktop.org/attachment.cgi?id=133883&action=edit
partical code c++

Windows 8.1 32 bit application, Cairo 1.15.2 - I'm trying to create a PDF with
a a large number of big images. The overall PDF size in inches is 150" x 60"
and I have PNG images that are 4k x 6k x 32 bit. The images are from from files
as you can see in the attached code I build a surface with the image and add it
to the context.

For each image I can see the memory usage going up until I hit 1gb and then
things start to fail (out of memory). I using the following to check usage:

    PROCESS_MEMORY_COUNTERS_EX pmc;
    pmc.cb = sizeof(PROCESS_MEMORY_COUNTERS_EX);
    GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS *)&pmc,
sizeof(pmc));

pmc.WorkingSetSize

The attached code is c# but I have a wrapper to the c++ library.

So my question is does cairo hold on to each surface even though I destroyed it
when I'm done? Or does cairo hold the info until the end of the process when
the PDF is actually written to disk?

Just trying to figure out how to move forward on this memory issue.

Thanks

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20170830/2b88abf5/attachment.html>


More information about the cairo-bugs mailing list