[poppler] Page::display function performance

Ilya Gorenbein igorenbein at finjan.com
Tue Mar 10 00:10:47 PDT 2009


Thanks for the quick reply. I am using TextOutputDev .
Attached is a callgrind profiler output. As you can see the most of the time at function Page::displaySlice
is spent on Gfx::display and Page::createGfx.


-----Original Message-----
From: poppler-bounces at lists.freedesktop.org [mailto:poppler-bounces at lists.freedesktop.org] On Behalf Of Albert Astals Cid
Sent: Monday, March 09, 2009 22:50
To: poppler at lists.freedesktop.org
Subject: Re: [poppler] Page::display function performance

A Dilluns, 9 de març de 2009, Ilya Gorenbein va escriure:
> Hello,
>
>
>
> I need to extract the text out of the document/page.
>
> I tried a void Page::display(OutputDev *out, double hDPI, double vDPI,
>
>                   int rotate, GBool useMediaBox, GBool crop,
>
>                    GBool printing, Catalog *catalog,
>
>                    GBool (*abortCheckCbk)(void *data),
>
>                    void *abortCheckCbkData,
>
>                    GBool (*annotDisplayDecideCbk)(Annot *annot, void
> *user_data),
>
>                    void *annotDisplayDecideCbkData) ;
>
>
>
> function (poppler version 0.10.4). When I measured performance of this
> function, I've got ~1.5 Mb/sec on dual core 2.33GHz CPU, 2 Gb of RAM,
> with kernel 2.6.24-17, Debian lenny distro.

Hope you are using a TextOutputDev there and not a renderer like Splash or 
Cairo.

>
> Please, advice me how the performance of this function could be
> improved.

You get a profiler like callgrind and send us patches that for the hot spots 
of the code.

> Is there another (cheaper) way to extract text out of the
> document/page.

I would say not, that's what pdftotext uses.

Albert

_______________________________________________
poppler mailing list
poppler at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler

-------------- next part --------------
A non-text attachment was scrubbed...
Name: callgrind.out.5523
Type: application/octet-stream
Size: 4197382 bytes
Desc: callgrind.out.5523
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090310/c394d177/attachment-0001.obj 


More information about the poppler mailing list