Date: Mon, 1 Jul 2013 01:29:40 GMT From: Devil <devzone.my@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/180144: PHP5-Extension FastStringSearch Message-ID: <201307010129.r611Tec9059058@oldred.freebsd.org> Resent-Message-ID: <201307010130.r611U0Pf050205@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 180144 >Category: ports >Synopsis: PHP5-Extension FastStringSearch >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jul 01 01:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Devil >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: FreeBSD 10.0-CURRENT amd64 >Description: This php module speedup str_trplace and strtr x500 MediaWiki used this module Patch attached This algorithm is realized in the form of a magic PHP-extensions created by the authors MediaWiki - php5-fss. In our case we have MediaWiki successful in finding substrings about 500 times, and taking into account that it takes about 75% of the time - we have the performance gain of about 4 times. If you put a little more effort than installing a ekstenzhna :-) you can even replace the function of strtr php5-fss. The only thing to be done - add caching state machine through an array of replacements. That is, make sure that before fss_exec_replace () invoked transparently fss_prep_replace (), building a machine. More information (Google Translate): http://goo.gl/JnKw4 >How-To-Repeat: >Fix: Patch attached with submission follows: diff -urBNs /usr/ports/textproc/php5-fss.orig/Makefile /usr/ports/textproc/php5-fss/Makefile --- /usr/ports/textproc/php5-fss.orig/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/textproc/php5-fss/Makefile 2013-07-01 03:18:25.101588720 +0200 @@ -0,0 +1,25 @@ + +PORTNAME= fss +PORTVERSION= 0.0.1 +CATEGORIES= textproc +MASTER_SITES= http://apt.wikimedia.org/wikimedia/pool/main/p/php5-fss/ +PKGNAMEPREFIX= php5- +DISTNAME= php5-fss_${PORTVERSION}.orig + +COMMENT= PHP5-Extension FastStringSearch + +LICENSE= PHP301 + +WRKSRC= ${WRKDIR}/php5-fss-${PORTVERSION} + +USE_PHP_BUILD= yes +USE_PHP= yes +USE_PHPIZE= yes +USE_PHPEXT= yes +DEFAULT_PHP_VER=5 + +PHP_MODNAME= fss + +.include <bsd.port.options.mk> + +.include <bsd.port.mk> diff -urBNs /usr/ports/textproc/php5-fss.orig/distinfo /usr/ports/textproc/php5-fss/distinfo --- /usr/ports/textproc/php5-fss.orig/distinfo 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/textproc/php5-fss/distinfo 2013-07-01 03:10:25.453620858 +0200 @@ -0,0 +1,2 @@ +SHA256 (php5-fss_0.0.1.orig.tar.gz) = 7c788c25c229360e5dfeaa7c262ec3e2e09b6c3dcccaf39c9e32414ed7c01228 +SIZE (php5-fss_0.0.1.orig.tar.gz) = 21753 diff -urBNs /usr/ports/textproc/php5-fss.orig/pkg-descr /usr/ports/textproc/php5-fss/pkg-descr --- /usr/ports/textproc/php5-fss.orig/pkg-descr 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/textproc/php5-fss/pkg-descr 2013-07-01 03:02:30.203653972 +0200 @@ -0,0 +1,11 @@ +This algorithm is realized in the form of a magic +PHP-extensions created by the authors MediaWiki - php5-fss. +In our case we have MediaWiki successful in finding substrings about 500 times, +and taking into account that it takes about 75% of the time - we have the performance gain of about 4 times. + +If you put a little more effort than installing a ekstenzhna :-) +you can even replace the function of strtr php5-fss. +The only thing to be done - add caching state machine through an array of replacements. +That is, make sure that before fss_exec_replace () invoked transparently fss_prep_replace (), building a machine. + +WWW: http://e-maxx.ru/algo/aho_corasick >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307010129.r611Tec9059058>