[wp-trac] [WordPress Trac] #54289: Improve get_shortcode_regex performance
WordPress Trac
noreply at wordpress.org
Tue Oct 19 09:02:03 UTC 2021
#54289: Improve get_shortcode_regex performance
-------------------------+-----------------------------
Reporter: Antek88 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: performance |
-------------------------+-----------------------------
Hi,
It's my first PR to WordPress, I hope it goes well :).
I ran Blackfire on my homepage (eCommerce shop with Woocommerce plugin).
After analyzing it, I see that many shortcodes are parsing, but I don't
use it directly. After some investigation, I see that in
`get_shortcode_regex` is many unnecessary call implode/array_map function
for empty `$tagsname` argument.
After this patch, page response time is reduced by almost ~200ms.
Blackfire profile screen:
[[Image(https://monosnap.com/file/Vq4pXvVggX2AdEG4736sl0cShQNBbk)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54289>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list