Make WordPress Core

Opened 4 years ago

Last modified 4 months ago

#54289 reviewing enhancement

Improve get_shortcode_regex performance

Reported by: antek88's profile Antek88 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.9
Component: Shortcodes Keywords: has-patch needs-refresh needs-test-info
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: https://monosnap.com/file/Vq4pXvVggX2AdEG4736sl0cShQNBbk

Change History (9)

#2 @flixos90
8 months ago

  • Milestone changed from Awaiting Review to 6.9
  • Owner set to flixos90
  • Status changed from new to reviewing

Thank you for the report @Antek88, and welcome to Trac.

While this may be a valid ticket, I think at this point short codes aren't recommended anymore, so I'd consider this low severity. That said, since you have already opened a pull request, it might be straightforward enough to address. Let me take a look.

#3 @oglekler
6 months ago

  • Keywords needs-refresh needs-test-info added

Patch needs refresh and it also needs instruction how to test it.

This ticket was mentioned in Slack in #core by wildworks. View the logs.


4 months ago

#5 @wildworks
4 months ago

This ticket was featured on today's 6.9 Bug Scrub.

Patch needs refresh and it also needs instruction how to test it.

As with the previous comment, I think this is necessary to move this ticket forward.

@mindctrl commented on PR #1769:


4 months ago
#6

@piotrantosik hi, thanks for the PR. Could you provide more info and testing instructions in the Trac ticket?

#7 @Antek88
4 months ago

Sorry, it's 4 years 4-year-old PR, I'm not working with WordPress anymore and don't remember :)

This ticket was mentioned in Slack in #core-performance by westonruter. View the logs.


4 months ago

#9 @westonruter
4 months ago

  • Milestone changed from 6.9 to Future Release
  • Owner flixos90 deleted

Punting since we're close to 6.9-beta1. Clearing out owner since no one is actively working on this right now.

Note: See TracTickets for help on using tickets.