[wp-trac] [WordPress Trac] #2548: ent2ncr is very, very slow
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 9 10:41:05 GMT 2006
#2548: ent2ncr is very, very slow
--------------------------+-------------------------------------------------
Id: 2548 | Status: new
Component: Optimization | Modified: Thu Mar 9 10:41:04 2006
Severity: enhancement | Milestone: 2.1
Priority: low | Version: 2.0.1
Owner: anonymous | Reporter: random
--------------------------+-------------------------------------------------
I was playing with a profiler this afternoon, and was surprised to see
that '''10%''' of the request execution time was being spent on ent2ncr().
That's incredibly high.
The patch I'm about to attach replaces the 250+ str_replace() calls with a
single one, which seems to be around 5-30x faster in real-world
situations. The speed difference decreases as the length of text parsed
increases. It was just a bit ahead at ~40,000 words of text, and the
profiler choked on anything more.
--
Ticket URL: <http://trac.wordpress.org/ticket/2548>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list