[poppler] RFC: whole-page search in the qt4 frontend
Adam Reichold
adamreichold at myopera.com
Thu Jun 28 08:53:45 PDT 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
If I remember correctly, some time ago someone proposed caching the
TextOuputDev/TextPage used in Poppler::Page::search to improve
performance. Instead, I would propose to add another search method to
Poppler::Page which searches the whole page at once and returns a list
of all occurrences.
Applications using the qt4 frontend and this method could then decide
whether to cache this information or not. The implementation of the
current search method would not change.
The appended patch does this. But the two search methods share some
duplicate code. I am not sure what the best way to avoid this is.
Testing this with some sample files shows large improvements (above
100% as measured by runtime) for searching the whole document and
especially for short phrases that occur often.
Thanks for any comments and advice. Best regards, Adam.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJP7H4JAAoJEPSSjE3STU34kOcIALdNTf42b+9si+OYy3ZeLDTj
S/0wHhAqtpCE6arBeN4kudVaSPB80MKzndHOpOHTm+KM79pjp4zYQHu3DIikBScT
B8mo5+ut987T4gPOWpfzRi4R1DBpA7Dukla0Az48WJl8PoeE6KM0uIyskVnjWN3V
bOqKnCcGhbtoUgIoMvlKh1gf9SJjIar/6Z9/q7mPefq59aCKQliudF/dMpfoLR9a
G9zTWUObtm9IwAXyKTR1+o3raNKHSsZF6Q2qpECi0CtDj2LZDwTpFNc/dw35kkql
XYHrvw7dmAPIHz8BHh2blGiCjul9FzOmdGdi8n3XI2mgquuhSCD+zbtyEe8b+eA=
=Qm8+
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_whole_page_search.patch
Type: text/x-patch
Size: 2642 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120628/ab6d87a5/attachment.bin>
More information about the poppler
mailing list