From owner-freebsd-ports@FreeBSD.ORG Thu Jul 3 06:28:05 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45AB9C54; Thu, 3 Jul 2014 06:28:05 +0000 (UTC) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "ca.infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C447D207E; Thu, 3 Jul 2014 06:28:04 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.9/8.14.9) with ESMTP id s636RqLr057007 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 3 Jul 2014 07:27:52 +0100 (BST) (envelope-from matthew@FreeBSD.org) Authentication-Results: lucid-nonsense.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org DKIM-Filter: OpenDKIM Filter v2.9.2 smtp.infracaninophile.co.uk s636RqLr057007 Authentication-Results: smtp.infracaninophile.co.uk/s636RqLr057007; dkim=none reason="no signature"; dkim-adsp=none; dkim-atps=neutral Message-ID: <53B4F7DE.9090300@FreeBSD.org> Date: Thu, 03 Jul 2014 07:27:42 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Michelle Sullivan , demon@FreeBSD.org, ports@freebsd.org Subject: Re: Patch (not perfect but half way there) for DBIx::SearchBuilder... References: <53B4C581.5060508@sorbs.net> In-Reply-To: <53B4C581.5060508@sorbs.net> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bHnV2egvcf31BgHfCQ4aMAdM8kiAaNmBb" X-Virus-Scanned: clamav-milter 0.98.3 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 06:28:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bHnV2egvcf31BgHfCQ4aMAdM8kiAaNmBb Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/07/2014 03:52, Michelle Sullivan wrote: > Matthew, "Demon" (cc'd you two specifically because the patch affects > ports you maintain directly) >=20 > I created a patch a while ago and sent it off to Jesse and the RT-Users= > mailing list to fix extremely slow loading of tickets for Request-Track= er. >=20 > The patch is for DBIx::Searchbuilder->Fields() and you can see it here:= > https://rt.cpan.org/Public/Ticket/Attachment/WithHeaders/733854 (bug: > https://rt.cpan.org/Public/Bug/Display.html?id=3D96902 ) >=20 > If it were to be shipped as an 'option' in FreeBSD ports would it be > attached to DBIx::SearchBuilder or RT 4.x? (the patch is against > DBIx::SearchBuilder, but very specifically affects RT) The rt4x ports can't patch files belonging to DBIx::Searchbuilder -- that's not allowed. The options are: * Unconditionally patch DBIx::Searchbuilder -- given the patch hasn't been accepted upstream and it looks like it could have a deleterious impact in some setups, this doesn't seem a good idea to me * Add an option to DBIx::SearchBuilder -- Apply the patch only by user choice. Doesn't help with pre-compiled packages, but seems like a reasonable alternative to me. * Do nothing -- Means you'ld have to maintain a locally modified version of DBIx::SearchBuilder I think if you prepared a patch implementing the second case for the databases/p5-DBIx-SearchBuilder port to "improve performance under high network latency" (which should be off by default, so not changing behaviour for other users unexpectedly) there's a good chance we'd accept it. > For a brief background on it... I've been trying to upgrade SORBS > Support from RT3.8 to RT4.0 and ticket loads are 4-6 minutes in RT4.0 > compared to my old 3.8 system.. The cause being that the new System ha= s > a Pg cluster of 4 servers which are in their own datacentres.. the RT > 'Front Ends' being in public network space in other datacentres. This > is a fairly standard security model.. put your application servers in a= > DMZ (or public network) and keep the Database Servers locked in their > own network.. Just a modest 20ms Ping time and 3 schemas (RT (public),= > Bucardo and Postgres) causes the ticket load to be 4-6 minutes per > ticket - single user, 2 frontends. Patching DBIx::SearchBuilder with > the patch in the bug, drops that down to 7 seconds. Yes, the patch is an obvious win for your circumstances. The question is what will it do for the majority of installations where the PostgreSQL database is on the same machine as the web frontend, or on a very nearby machine? > Best Practical have been less than helpful, so thinking about writing a= > patch for FreeBSD ports as a new 'option' as most of my servers are > FreeBSD with my own Pkg Repo... Thoughts? In this case you can quite easily maintain a local patch in your checked-out ports tree. You know about 'make makepatch' ? That will create a files/patch-Mumble file which will be applied automatically every time you re-build p5-DBIx-SearchBuilder. > (Read the bug for the 'half way there' bit - the whole ->Fields() call > has a bad flaw.. and FWIW, a user running MySQL will not be affected by= > my patch in any negative way as MySQL is case insensitive for table > names - unlike PostgreSQL and others.) Your patch does seem to be fixing the problem --- DBIx::SearchBuilder pulling data out of too many schemas --- in a fairly non-obvious way. It's not clear to me that it is a generic fix for everyone whose databases are a long way away from their frontends either. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --bHnV2egvcf31BgHfCQ4aMAdM8kiAaNmBb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJ8BAEBCgBmBQJTtPfoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATRHsP/1evXZbkhf+I3zbocmrkOloQ 9G1Vml9k520Sboa4HOugzUsC4Yj/LewoSc7OLA70t2gF7OihIQaBOXP8zMoRgl6R s+nyYOXBPger1mSl8E3vQZmYTeZ4zJdj78JjVXhVXPGVWAy7zjQCHbz2I8l07XCk 8m9e5UAqhs1upzFV2lgVgV3UswQDR8fw1y1tudkFIPW6nbN9BqPyOOs7tSQMo6g0 KKpaYnpupeWuC7o+QcP4QkeXkZg0F56V7O/nPZ62sYwtkxQlGogGIEy1JU6ELSNZ vxfy4G+KrbBudpxH9lEcVLVJAHOtlef1ufPmeuZXa8ODPi6Amtz0OtqW/ovQoPeS Fg+jhyAGs35vwEXBEWYowbJsWATqEOQ5dIJ0oVBpEyTPJ5e8+/DW427RkX78J9Nw SKKPpMLm2zqnF1/o0Zbduh8heM7zrTBcsVmdsPAoIiR9pd75xqHixGcQ+xrc/xv8 KFmEAOBV5CBS2CUAK2OzZ4wZF8WbBreooxOIhgMNAVxV8rOYVdjwcp4lnehImgER XudA59x/f5QsS7J30F1b3340z53Rg7nn6hKxZ8K3b/WkGACrQq0F9s2kdYfayyoX ilg3nq2Yc397hoS28vW0ckzHEDyIivxuVeOXseMPjW1+cxal6/XHpTm1a1UjdO51 oYykYEM02aW9LTEggS1Y =5hX9 -----END PGP SIGNATURE----- --bHnV2egvcf31BgHfCQ4aMAdM8kiAaNmBb--