From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jul 1 01:30:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7546495E for ; Mon, 1 Jul 2013 01:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 5CDE1138B for ; Mon, 1 Jul 2013 01:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r611U0xA050207 for ; Mon, 1 Jul 2013 01:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r611U0Pf050205; Mon, 1 Jul 2013 01:30:00 GMT (envelope-from gnats) Resent-Date: Mon, 1 Jul 2013 01:30:00 GMT Resent-Message-Id: <201307010130.r611U0Pf050205@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Devil Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 51C80958 for ; Mon, 1 Jul 2013 01:29:41 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id 340291387 for ; Mon, 1 Jul 2013 01:29:41 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r611TenQ059059 for ; Mon, 1 Jul 2013 01:29:40 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r611Tec9059058; Mon, 1 Jul 2013 01:29:40 GMT (envelope-from nobody) Message-Id: <201307010129.r611Tec9059058@oldred.freebsd.org> Date: Mon, 1 Jul 2013 01:29:40 GMT From: Devil To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/180144: PHP5-Extension FastStringSearch X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2013 01:30:00 -0000 >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 + +.include 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: