Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5B369200C1C for ; Wed, 15 Feb 2017 20:29:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 59FA4160B5E; Wed, 15 Feb 2017 19:29:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8A5D9160B4D for ; Wed, 15 Feb 2017 20:29:43 +0100 (CET) Received: (qmail 78835 invoked by uid 500); 15 Feb 2017 19:29:42 -0000 Mailing-List: contact dev-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list dev@mesos.apache.org Received: (qmail 78806 invoked by uid 99); 15 Feb 2017 19:29:42 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2017 19:29:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D8A29C08C8 for ; Wed, 15 Feb 2017 19:29:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.122 X-Spam-Level: X-Spam-Status: No, score=-0.122 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Xa8r9VIedvvF for ; Wed, 15 Feb 2017 19:29:40 +0000 (UTC) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0116.outbound.protection.outlook.com [104.47.33.116]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id ED2F05F4AC for ; Wed, 15 Feb 2017 19:29:39 +0000 (UTC) Received: from MWHPR03MB3056.namprd03.prod.outlook.com (10.175.137.21) by MWHPR03MB3054.namprd03.prod.outlook.com (10.175.137.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Wed, 15 Feb 2017 19:29:18 +0000 Received: from MWHPR03MB3056.namprd03.prod.outlook.com ([10.175.137.21]) by MWHPR03MB3056.namprd03.prod.outlook.com ([10.175.137.21]) with mapi id 15.01.0888.030; Wed, 15 Feb 2017 19:29:18 +0000 From: Jeff Coffler To: "dev@mesos.apache.org" Subject: RE: Proposal for Mesos Build Improvements Thread-Topic: Proposal for Mesos Build Improvements Thread-Index: AdKG+AOAdK9amvQjS3yHvUXWC4IlxgAx3BkAAABkuwAAAB4/YA== Date: Wed, 15 Feb 2017 19:29:17 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jeff.Coffler@microsoft.com; x-originating-ip: [2001:4898:80e8:3::64a] x-ms-office365-filtering-correlation-id: 023446b3-f81c-4b69-76e7-08d455d8ef39 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:MWHPR03MB3054; x-microsoft-exchange-diagnostics: 1;MWHPR03MB3054;7:MD7qRcO8B0F/LZU3gCg7zlvBjSCwnzb5Ub+cC9FoR7HqoUB4PmoyzaIMXpZGUrolinQ+lDr3D0ceYSNYg8gzeLqGHE35hPPxOVi1/9s83Ej9YwxwVh/2zuA+4JFpoFOHseLYSNtPJ4WimtyOwOucx0PGP8lxfnZUp6b2RpjFgkWOpMEitNuJzDWaE/uoqKowhpE8mPzmj4gG1prSxRbvLWmFXZeLR5uynqrUan/Mws1yxLIxL8lqFtXWpT6kHCJTbvtiqnLtYCH+TbLbITbrT0Po4xH41B58uzBxTS5T2+5mriaeyaNfaeblyOsS2pKmQkspXwp2ixeuD4mVpN9qqQNONjqtxkncXq9AhaqOzHk= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123558025)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(6072148);SRVR:MWHPR03MB3054;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB3054; x-forefront-prvs: 021975AE46 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(39850400002)(39840400002)(39450400003)(39860400002)(39410400002)(54094003)(377454003)(24454002)(199003)(189002)(13464003)(2501003)(81166006)(81156014)(33656002)(1730700003)(122556002)(10090500001)(2900100001)(53936002)(189998001)(6506006)(25786008)(99286003)(229853002)(389900002)(55016002)(3660700001)(3280700002)(2950100002)(86612001)(110136004)(7696004)(77096006)(5640700003)(6436002)(6246003)(86362001)(5660300001)(38730400002)(68736007)(9686003)(6916009)(305945005)(97736004)(8676002)(10290500002)(6116002)(74316002)(7736002)(5005710100001)(8990500004)(102836003)(101416001)(8936002)(105586002)(2351001)(50986999)(450100001)(561944003)(2906002)(106356001)(54356999)(92566002)(76176999)(14943795004);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR03MB3054;H:MWHPR03MB3056.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2017 19:29:17.7307 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB3054 archived-at: Wed, 15 Feb 2017 19:29:44 -0000 I agree with the first part (PCHs will introduce some additional dependenci= es for some object files). I do not agree with the second point (PCHs become bloated over time, thus r= educing time savings). The key point with PCH is that mesos_common.h is only read ONCE. Even if la= rge and bloated, since it's only read once, the time savings is not diminis= hed at all. /Jeff -----Original Message----- From: Alex Clemmer [mailto:clemmer.alexander@gmail.com]=20 Sent: Wednesday, February 15, 2017 11:24 AM To: dev Subject: Re: Proposal for Mesos Build Improvements Yes, that is right, PCHs would probably introduce some additional dependenc= ies for some object files, and if those PCHs become bloated over time, then= you can expect this to be expressed as diminishing time savings. This does imply that maintaining PCHs will require at least some work. __ Transcribed by my voice-enabled refrigerator, please pardon chilly messages= . On Wed, 15 Feb 2017, Neil Conway wrote: > On Tue, Feb 14, 2017 at 11:28 AM, Jeff Coffler=20 > wrote: >> For efficiency purposes, if a header file is included by 50% or more of = the source files, it should be included in the precompiled header. If a hea= der is included in fewer than 50% of the source files, then it can be separ= ately included (and thus would not benefit from precompiled headers). Note = that this is a guideline; even if a header is used by less than 50% of sour= ce files, if it's very large, we still may decide to throw it in the precom= piled header. > > It seems like this would have the effect of creating many false > dependencies: if file X doesn't currently include header Y but Y is=20 > included in the precompiled header, the symbols in Y will now be=20 > visible when X is compiled. It would also mean that X would need to be=20 > recompiled when Y changes. > > Related: the current policy is that headers and implementation files=20 > should try to include all of their dependencies, without relying on=20 > transitive includes. For example, if foo.cpp includes bar.hpp, which=20 > includes , but foo.cpp also uses , both foo.cpp and=20 > bar.hpp should "#include ". Adopting precompiled headers would=20 > mean making an exception to this policy, right? > > I wonder if we should instead use headers like: > > <- mesos_common.h -> > #include > #include > #include > > <- xyz.cpp, which needs headers "b" and "d" -> #include=20 > "mesos_common.h> > > #include > #include > > That way, the fact that "xyz.cpp" logically depends on (but not=20 > or ) is not obscured (in other words, Mesos should continue to=20 > compile if 'mesos_common.h' is replaced with an empty file). Does=20 > anyone know whether the header guard in _should_ make the repeated=20 > inclusion of relatively cheap? > > Neil >