Large memory usage when rendering a PDF

291 views
Skip to first unread message

Jeroen Bobbeldijk

unread,
Sep 7, 2022, 4:42:21 AM9/7/22
to pdfium
Hi,

I have a PDF that uses a lot of memory to be rendered, opening up the PDF in Chrome also makes it very slow.

I ran the PDF through pdfium_test and created this Valgrind dump:

Selection_584.png

However, it sadly doesn't really show what's causing this memory consumption.

What would be the best method to research this specific PDF?

Jeroen Bobbeldijk

unread,
Sep 7, 2022, 4:45:42 AM9/7/22
to pdfium
Sorry about that, that seems to be a red herring, this memory consumption happens on any PDF.
It rather seems to be a CPU usage issue which is causes the slow down. I will do some more research but any pointers to debugging such issues would be helpful.

Jeroen Bobbeldijk

unread,
Sep 7, 2022, 5:18:13 AM9/7/22
to pdfium
Compared to a normal PDF, in this one a huge amount of time is spent on shading it seems. Other viewers like PDF.js render it fine. It's from Adobe Illustrator, so it might contain some odd effects?

Selection_585.png

I think this one is a bit too complicated for me to fix myself, anyone I can share the PDF with privately?



Lei Zhang

unread,
Sep 7, 2022, 11:44:05 AM9/7/22
to Jeroen Bobbeldijk, pdfium
This sounds like a good candidate for a bug report. Care to file one?

--
You received this message because you are subscribed to the Google Groups "pdfium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/901d59e1-39f4-4734-b673-70452e343645n%40googlegroups.com.

Jeroen Bobbeldijk

unread,
Sep 8, 2022, 8:12:15 AM9/8/22
to pdfium
Sure, but I don't think I'm able to describe the issue very well...
Reply all
Reply to author
Forward
0 new messages