[poppler] [PATCH 4/4] SplashXPathScanner: Reduce complexity of sorting spans

Adam Reichold adam.reichold at t-online.de
Sat May 26 07:33:50 UTC 2018


Hello Stefan,

Am 26.05.2018 um 04:34 schrieb Stefan BrĂ¼ns:
> To avoid large number of allocations for common simple polygons,
> boost::container::small_vector<4, T> is used, which stores up to
> 4 intersections inline. small_vector is a header-only class.

Even though it is header-only, it still means that Boost becomes a new
build time dependency. Hence also CMakeLists.txt needs to adjust to find
the Boost headers in possibly non-standard paths and giving a configure
time error message if the necessary Boost headers are not present.

Personally, I would like it very much if Boost becomes a build time
dependency for it contains many useful primitives and utilities. But I
guess it would be best to reduce your XPathScanner patch to something
purely based on the standard library - even if it allocates some more -
and tackle the issue of using small_vector in a separate follow-up patch.

Also, maybe you would like to run this on a larger collection of
documents to see a more statistical view of the performance
improvements? Possibly, the attached perftest scripts helps with that.

Best regards,
Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-perftest.diff
Type: text/x-patch
Size: 19059 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20180526/f7789da9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20180526/f7789da9/attachment.sig>


More information about the poppler mailing list