[wp-trac] [WordPress Trac] #22692: Quotes Are Messing Up
WordPress Trac
noreply at wordpress.org
Mon Mar 17 23:21:42 UTC 2014
#22692: Quotes Are Messing Up
----------------------------------------------------+------------------
Reporter: miqrogroove | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9
Component: Formatting | Version: 1.2
Severity: normal | Resolution:
Keywords: has-patch commit 3.9-early wptexturize | Focuses:
----------------------------------------------------+------------------
Comment (by miqrogroove):
Initial testing shows a '''massive performance improvement''' after the
patch, as-is!
Using, for example:
{{{
$start = microtime(TRUE);
for ($i = 0; $i<5; $i++) {
$curl = preg_replace($dynamic_characters, $dynamic_replacements, $post);
}
$end = microtime(TRUE);
}}}
Here were the results based on the old and new regexp strings, tested
against a 9,911 byte post.
Old logic, 1 iteration = 0.0128 sec
Old logic, 5 iteration = 0.0658 sec
Old logic, 10 iteration = 0.1308 sec
Old logic, 25 iteration = 0.3159 sec
New logic, 1 iteration = 0.0020 sec
New logic, 5 iteration = 0.0094 sec
New logic, 10 iteration = 0.0188 sec
New logic, 25 iteration = 0.0468 sec
I will take a closer look now to see if any tuning would be worthwhile.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22692#comment:79>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list