Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78988 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19281 invoked from network); 19 Nov 2014 11:29:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2014 11:29:06 -0000 Authentication-Results: pb1.pair.com header.from=are.you.winning@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=are.you.winning@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.182 as permitted sender) X-PHP-List-Original-Sender: are.you.winning@gmail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:55109] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/80-15892-00F7C645 for ; Wed, 19 Nov 2014 06:29:05 -0500 Received: by mail-wi0-f182.google.com with SMTP id h11so1472306wiw.15 for ; Wed, 19 Nov 2014 03:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Yq6xkdHMaRFSOU7T2A/Vpblj1fnNs+GhoLLWbm3PgH4=; b=jpCcjVfPix3clDDLQ/vjOiSXbd4vGhQgBQzUl6bGL+ikMVPUN+5s+xAOnlsXfgT1zO kfrHomxs3l2A9yoJkGUMZ3QACtsPnwyGvzlCOUJ0b+tjxU3WorIktMpWfopcbo0pUOwI d9UaQqryPMsqE7TEWAcbWVhZECFLpsTOXeIdP0Oml5bkSXxGK2Y9FmweuvuiSnNYWxmZ zEE9NhOXTEWSapy3Iowma7epRvCEhoRTCq8JMljevjdeLx3X2PBn/Nov2MfpsGRwIDHu c/BBqW+0p9WEQLRAa0UHE0Kzblp3Nh6eyYLVk5ufdhTYx5QQ2WTczPVGMzOgROgjywZF jTwQ== MIME-Version: 1.0 X-Received: by 10.194.58.8 with SMTP id m8mr57982815wjq.43.1416396542097; Wed, 19 Nov 2014 03:29:02 -0800 (PST) Sender: are.you.winning@gmail.com Received: by 10.180.8.36 with HTTP; Wed, 19 Nov 2014 03:29:02 -0800 (PST) In-Reply-To: <546BAA7D.1070905@kippdata.de> References: <546BAA7D.1070905@kippdata.de> Date: Wed, 19 Nov 2014 11:29:02 +0000 X-Google-Sender-Auth: 2tlmVkiTdbaerjQOISdq2eUxStw Message-ID: To: Rainer Jung Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7ba97632c0c1db05083484e7 Subject: Re: [PHP-DEV] Using a common shared lib for multiple SAPIs? From: cw@daverandom.com (Chris Wright) --047d7ba97632c0c1db05083484e7 Content-Type: text/plain; charset=UTF-8 On 18 November 2014 20:22, Rainer Jung wrote: > Hi there, > > the default build process of PHP on Unix/Linux links together all code > needed for any SAPI that one builds (excluding dynamically loadable > extensions). This often leads to relatively big SAPI shared object files. > But most of this code is exactly the same for all SAPIs. That adds > considerable to the package size if one ships e.g. CLI, CGI, mod_php and > FPM. > > One could instead use one common shared library which conatins most of the > code and only small additional SAPI shared object files with the SAPI > specifics. > > I twisted the existing build process to achieve this building of a common > lib plus one shared object per SAPI and it seems to work well. Is there any > interest in adopting the existing build process to this? > > I can provide details how I do it currently. I use it for 5.5 and 5.6, but > I expect it to work similarly for master which would probably be the target > for the change. > > Thanks for any feedback, > > Rainer I believe this is how the Windows bins are built, with relatively small binaries for the SAPI entry points and most of the code shared in php5.dll/php5ts.dll. While there's no problem with this approach in general, there are a couple of points here: - It makes running more than one version of PHP on the same machine that little bit more complex. - The wasted space we are talking about here is only a matter of a few MBs, tens of MBs at the most. In terms of modern computing this is almost nothing. In short, while I have no problem with altering the build process to make this *an option*, I wouldn't like it to be the default behaviour because the gains are just not big enough and it creates a couple of extra tripping hazards. Thanks, Chris --047d7ba97632c0c1db05083484e7--