From: Chris S. <chr...@us...> - 2023-08-16 16:37:29
|
--- **[patches:#206] Improve SmartQuote performance** **Status:** open **Group:** None **Created:** Wed Aug 16, 2023 04:37 PM UTC by Chris Sewell **Last Updated:** Wed Aug 16, 2023 04:37 PM UTC **Owner:** nobody **Attachments:** - [0001-Pre-compile-smartquote-regexes.patch](https://sourceforge.net/p/docutils/patches/206/attachment/0001-Pre-compile-smartquote-regexes.patch) (8.3 kB; application/octet-stream) - [sphinx-build-after.svg](https://sourceforge.net/p/docutils/patches/206/attachment/sphinx-build-after.svg) (199.1 kB; image/svg+xml) - [sphinx-build-before.svg](https://sourceforge.net/p/docutils/patches/206/attachment/sphinx-build-before.svg) (282.1 kB; image/svg+xml) Performing a representative sphinx-build (10 x docutils/docs/ref/rst/restructuredtext.txt, dummy builder), and analysing with py-spy, you can see from the attached flamegraph that the smartquote transform accouts for over 22% of the build time! This PR attempts to improve that situation (at least down to 18%) by caching regex compilation --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |