Opened 3 years ago
Last modified 3 years ago
#54289 new enhancement
Improve get_shortcode_regex performance
Reported by: | Antek88 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Shortcodes | Keywords: | has-patch |
Focuses: | performance | Cc: |
Description
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:
Change History (1)
This ticket was mentioned in PR #1769 on WordPress/wordpress-develop by piotrantosik.
3 years ago
#1
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/54289#ticket