From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id E823740FCE for ; Mon, 14 Mar 2022 14:28:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AADC768AFC9; Mon, 14 Mar 2022 16:28:52 +0200 (EET) Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3556468ADD4 for ; Mon, 14 Mar 2022 16:28:46 +0200 (EET) Received: from relay6-d.mail.gandi.net (unknown [217.70.183.198]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 8AA76C3056 for ; Mon, 14 Mar 2022 14:23:33 +0000 (UTC) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 97A2BC000B for ; Mon, 14 Mar 2022 14:23:27 +0000 (UTC) Date: Mon, 14 Mar 2022 15:23:26 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220314142326.GA2829255@pb2> References: <20220223142951.40366-1-martin@martin.st> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 00/13] [RFC] Reduce unnecessary recompilation X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============8666369635846572532==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8666369635846572532== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ogsCntE11hez7gTb" Content-Disposition: inline --ogsCntE11hez7gTb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 11, 2022 at 02:17:42PM +0200, Martin Storsj=F6 wrote: > On Wed, 23 Feb 2022, Martin Storsj=F6 wrote: >=20 > > When updating the ffmpeg source, one quite often ends up in a situation > > where practically all of the codebase (or all of a library) gets rebuil= t, > > due to updates to headers that are included in most files. > >=20 > > In some cases, full rebuilds are warranted of course, but they could al= so > > be avoided in many cases - e.g. such as if the minor/micro version of > > a library has been bumped, or if a new component (codec, demuxer, filter > > etc) has been enabled (or removed if reconfiguring with an older source > > version). Very few source files are affected by exactly what the full > > library version is, or by the full list of enabled components. > >=20 > > To avoid such rebuilds, I've got a proof of concept patchset that > > splits headers, so that most source files avoid including the bits that > > change often and that shouldn't affect how they are built. > >=20 > > - The version.h headers are split into a separate version_major.h which > > contains only the major library version, and accompanying FF_API_* > > defines. The main library headers only include version_major.h, and > > files that need the exact version (e.g. LIB_VERSION* or > > LIB_IDENT) can include version.h explicitly. This is a minor > > break of the public API though, as definitions that used to be availab= le > > no longer are. > >=20 > > This works mostly fine for most libraries, but there's little point in > > splitting libavutil/version.h, because LIBAVUTIL_VERSION_INT is used > > in every source file that defines an AVClass. > >=20 > > By splitting version.h, and update to the minor/micro version numbers > > of all libraries except avutil now would require recompiling 30 > > files instead of 1653 before. > >=20 > > (This change also should lower the barrier to and reduce the risk of > > forgetting to bump the version numbers, which one otherwise often > > postpones while working on a patch, as it forces rebuilds.) > >=20 > > - config.h is split into a separate config_components.h that includes t= he > > list of enabled/disabled components (corresponding to $ALL_COMPONENTS > > in configure). One could consider splitting up config.h even more, but > > that probably gives less benefit compared to the amount of churn. > >=20 > > Surprisingly, a nontrivial number of source files do depend on the > > state of specific encoders/decoders/components, so quite a few files > > do end up requiring including config_components.h. (Also this change > > can possibly break compilation of source files that require external > > dependencies that I haven't tested.) > >=20 > > In practice, this reduces the number of rebuilt source files from > > 1979 to 193, if there's a change to the list of enabled components > > but not to the rest of config.h. > >=20 > > What do you think - is it worth the slight churn to avoid pointless > > rebuilds? >=20 > Ping - I never got any feedback on the general concept of this patchset; = is > either of the refactorings worthwhile? I think its a good idea. Faster rebuilds & tests are always desirable thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin --ogsCntE11hez7gTb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYi9P3gAKCRBhHseHBAsP q88xAKCK4q0Y9ZdMFg2tLn+9GW0ZXqqAEQCgkDXe/f3YwGBHyM8oFBikD+jFwxc= =kni0 -----END PGP SIGNATURE----- --ogsCntE11hez7gTb-- --===============8666369635846572532== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============8666369635846572532==--