[wp-trac] [WordPress Trac] #23855: Leave Shortcode functions early, if there's no Shortcode delimiter
WordPress Trac
noreply at wordpress.org
Thu Feb 27 23:49:25 UTC 2014
#23855: Leave Shortcode functions early, if there's no Shortcode delimiter
-------------------------+--------------------------
Reporter: TobiasBg | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.9
Component: Shortcodes | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
-------------------------+--------------------------
Comment (by SergeyBiryukov):
My results are similar, but the patched `had_shortcode()` appears to be
slower both with and without shortcodes:
|| ||Text with Shortcodes||Text without Shortcodes||
||`has_shortcode()`||1.121s — unpatched||1.133s — unpatched||
|| ||1.725s — [attachment:23855.2.patch]||2.374s —
[attachment:23855.2.patch]||
||`do_shortcode()`||41.693s — unpatched||13.464s — unpatched||
|| ||43.025s — [attachment:23855.2.patch]||2.353s —
[attachment:23855.2.patch]||
||`strip_shortcodes()`||21.834s — unpatched||13.405s — unpatched||
|| ||22.650s — [attachment:23855.2.patch]||2.345s —
[attachment:23855.2.patch]||
So, yeah, the check should only be added to `do_shortcode()` and
`strip_shortcodes()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23855#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list