[wp-trac] [WordPress Trac] #23855: Leave Shortcode functions early, if there's no Shortcode delimiter
WordPress Trac
noreply at wordpress.org
Thu Apr 4 09:22:07 UTC 2013
#23855: Leave Shortcode functions early, if there's no Shortcode delimiter
-------------------------+------------------------------
Reporter: TobiasBg | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by TobiasBg):
Good question. I'm not really sure what the best strategy is to reliably
test this for a real-world scenario. bobbingwhite seems to have done some
simple testing in [http://core.trac.wordpress.org/ticket/17657#comment:18
this comment], with the functions being 4 to 5 times faster.
Given how many themes add several Shortcodes nowadays, just the many
function evaluations in {{{get_shortcode_regex()}}} (especially {{{the
array_map(...)}}}) might already have potential for savings. The PREG
function is probably even more expensive than that, and saving that might
also have potential.
This is increased by the fact, that {{{get_shortcode_regex()}}} is called
for every single post/page, so usually at least ten times on most blog
pages - another factor of 10 for savings.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23855#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list