#40559 [Bgs]: UTF-8 PCRE process speed too slowly
| From: | hunreal at gmail dot com | Date: | Tue, 20 Feb 2007 17:27:23 +0000 |
| Subject: | #40559 [Bgs]: UTF-8 PCRE process speed too slowly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109202@lists.php.net to get a copy of this message | ||
ID: 40559
User updated by: hunreal at gmail dot com
Reported By: hunreal at gmail dot com
Status: Bogus
Bug Type: PCRE related
Operating System: FreeBSD 6.2, Windows
PHP Version: 5.2.1
New Comment:
I tested php 5.2.1 compiled with pcre 6.6, 6.7(bundled) and 7.0 on dual
P3-1.13G, Freebsd 6.2.
php 5.1.6 with bundled pcre 6.6, process time is 1.03s.
php 5.2.1 with bundled pcre 6.7, process time is 4.07s.
php 5.2.1 with pcre 6.6, process time is 4.38s.
php 5.2.1 with pcre 7.0, process time is 2.43s.
CFLAGS and CXXFLAGS is '-O2 -pipe -fno-strict-aliasing'
PCRE is compiled by './configure --enable-utf8
--enable-unicode-properties'.
PHP configure command, './configure' '--disable-debug'
'--enable-inline-optimization' '--with-zlib' '--enable-zend-multibyte'
'--enab
le-mbregex' '--enable-mbstring=all' '--disable-cgi'
'--with-iconv=/usr/local' '--with-l
ibxml-dir=/usr/local'
I use --with-pcre-regex=DIR to specify DIR where PCRE's include and
library files are located.
Previous Comments:
------------------------------------------------------------------------
[2007-02-20 15:22:40] tony2001@php.net
The processing is done by PCRE library, not PHP.
Please report this problem to PCRE developers.
------------------------------------------------------------------------
[2007-02-20 15:10:45] hunreal at gmail dot com
Description:
------------
From PHP 5.2.0, I found the speed of PCRE process UTF-8 pattern is too
slowly.
Reproduce code:
---------------
http://www.hshh.org/temp/test.phps
Script is UTF-8 Simplified Chinese string pcre_replace testing.
I was also tested replace PCRE lib of php 5.2.0 from 6.7 to 6.6 not
bundled, no different result.
Expected result:
----------------
FreeBSD, PHP 5.2.1, process time: 3.76s (dual p3-1.26G).
Windows2003, PHP 5.2.0, process time: 17.91s (Pentium-M 1.7G)
If I don't set 'pcre.backtrack_limit' to '-1', script will break
pcre_replace.
Actual result:
--------------
PHP 5.1.6 at FreeBSD, process time: 0.93s
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40559&edit=1