From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 8EEA54BBEB
	for <ffmpegdev@gitmailbox.com>; Sat, 29 Mar 2025 18:22:44 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0154E687C26;
	Sat, 29 Mar 2025 20:22:41 +0200 (EET)
Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com
 [209.85.208.178])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CE25F687AB0
 for <ffmpeg-devel@ffmpeg.org>; Sat, 29 Mar 2025 20:22:33 +0200 (EET)
Received: by mail-lj1-f178.google.com with SMTP id
 38308e7fff4ca-30bee278c2aso44193891fa.0
 for <ffmpeg-devel@ffmpeg.org>; Sat, 29 Mar 2025 11:22:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=martin-st.20230601.gappssmtp.com; s=20230601; t=1743272553; x=1743877353;
 darn=ffmpeg.org; 
 h=mime-version:references:message-id:in-reply-to:subject:to:from:date
 :from:to:cc:subject:date:message-id:reply-to;
 bh=U8syRV0obUhDr1u7dVUmagGPyLa242WFU6LYkrebfZE=;
 b=GcL3RpvmVP09NGRkquL08FQhIoVeTSfTnMZBX9g7q7ftszXhL/mkTAm2kfNvHLurGm
 1pQ2bR4SRW7KlxN2hMsr0PZtz45hGB2lzyoq9paDJ0jDVnvpb24M3Vu2wHYUxzCh4O/O
 NoBW+d+ciNb6eoaTiLNKM60F7VXoD88Ks7kE0XzMfr7z57EZ9XhcBjF7wdRj73irCwp2
 8P25wrBCdA595ogB+K7BljGDmRwqIL6iRkRv2I78rQL9FHaC2OnJGpPhdd/1J8CQa8ie
 Iya4tmnd2H1F83v7DNNZIRbcf+N18EaZoeyheai0VfotY7okww17XbbTQYmtC/8dI/t5
 Q3Qw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743272553; x=1743877353;
 h=mime-version:references:message-id:in-reply-to:subject:to:from:date
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=U8syRV0obUhDr1u7dVUmagGPyLa242WFU6LYkrebfZE=;
 b=A11gNbaxs1EzLp6G4ne15IhGUstZ45g+v8wxucUJOTewwL9HDuTJ2WGvg85Grvn8g2
 RZlQ6k6QQDR4dd4+T3qtvxGj4wdb8aSlIzWNupC/bct1YXD0MouCCgekkV37oGIBUEs1
 NICu7ocFS6i1B2PKH/O25fzOuPxbGK0Iq5guUa5z1yXyXfmPPoUF+jWTJ0H1c1y37qe5
 EBihqLvFTKIUNNAH1sziAARE3y/UdvpeAGhpfFj9ZFzU+G0aK7r0gx9aiwrLPgoL6iAO
 TLarHVE6T1pn9Z0d8MVswp4phbnTUyDyqBTQplJ3WCts9X11hAT+B8IX9KSiRBy6q/um
 Og4w==
X-Gm-Message-State: AOJu0YxZG4eAMrq9GUfKyWrlsweY5/hDk+nl0+tZ5jT8eG3wLVkzLn1g
 dfocgV4d7GIYEEFqbUzhyCEQvIk8pAbzb/yIeXatsQZtxyS8Hi1VebAdzTlSH0BsFk+x1K9zFSR
 ydA==
X-Gm-Gg: ASbGncvtBxCM+DbzG2EGEAvN+Mavd+DhOfj6w7tNjll9PMa58ky18XqP9wKwYIpRKDc
 n3Da/UH7NyzcUrtFD8fHpKbYDrjliKpXyIswD/kONYXB0DSxrUDVuiuwKBW9WlyFrSBZDXSiSv2
 nlmBNul9qyPFcvFd4hotlXW/eNK1VPRVDXS7KFyOIOOH+mTFYV+UYSbF8T+HqMEjgPOvUQgbEDg
 /f+54oYVSW+a2tcN/VZ6L6L4AbkkJSKoUIiU2dGmWxf8TqP16VXHa9PJYGSdKcDfafSignl4th5
 3IBFcLgkV+OQ/CpD6EhRi9MqKTot0hMlK3297X6pnhtydZ9syMQQ7GKaUDXELMQjBCy24Up0O0s
 umThqwv++YbiwTQljqeffdpHPzjO/2ktR5uKTtClh
X-Google-Smtp-Source: AGHT+IFzMgkqNeogTmDQ/GU6HkyOK7+dXSticZP5BO6OX+8hi/oxVqE5UCs+cNyHxPdCsJpXsB8j6g==
X-Received: by 2002:ac2:4c4f:0:b0:549:4ca4:504a with SMTP id
 2adb3069b0e04-54b106db87cmr1127809e87.4.1743272552680; 
 Sat, 29 Mar 2025 11:22:32 -0700 (PDT)
Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net
 (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2])
 by smtp.gmail.com with ESMTPSA id
 2adb3069b0e04-54b094bb2fasm668434e87.50.2025.03.29.11.22.31
 for <ffmpeg-devel@ffmpeg.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 29 Mar 2025 11:22:31 -0700 (PDT)
Date: Sat, 29 Mar 2025 20:22:28 +0200 (EET)
From: =?ISO-8859-15?Q?Martin_Storsj=F6?= <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
In-Reply-To: <2a6735b2-a4db-450b-b704-838c82dc26f4@gyani.pro>
Message-ID: <d47edc60-fd4c-9f48-3c50-da6017ab8efb@martin.st>
References: <20250321104136.54347-1-ffmpeg@gyani.pro>
 <b8df6d89-2f93-5031-1b1c-1e1f2a141841@martin.st>
 <6e1ec5c4-99ef-4e0f-87f7-e0f1990d982a@gyani.pro>
 <CALweWgC-wH=gf=ZHBON87-4nd_e_tqztpuieL7RytFnzsoOW6g@mail.gmail.com>
 <b4eecd3c-de3e-42f0-a3ea-f1852f743049@gyani.pro>
 <GV1SPRMB0036A2ACE7C3B274C68C9EA38FA62@GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM>
 <e1a0be0b-b2cc-43dd-bf23-325cb2062261@gyani.pro>
 <906f9354-9cf9-4ca9-a239-0f84f4a79bfc@gyani.pro>
 <CALweWgD6g=Ub9dyf-SuHYb487ackJ6uyJa7VNw8MoarHBF0yvQ@mail.gmail.com>
 <2a6735b2-a4db-450b-b704-838c82dc26f4@gyani.pro>
MIME-Version: 1.0
Subject: Re: [FFmpeg-devel] [PATCH 1/2] ffbuild: compose linker response
 files in a loop
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/d47edc60-fd4c-9f48-3c50-da6017ab8efb@martin.st/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

On Sat, 29 Mar 2025, Gyan Doshi wrote:

>> Did you not try to use GNU make's flie function?
>
> I just benched this and it ranges from 1m28.093s to 1m29.971s (5% 
> faster) for the lavc targets.
> However, this was added in make 4.0. Are we supporting older make?

Yes, we generally do support older GNU make; macOS (even the latest 
versions) only ships with GNU make 3.81.

Regarding measuring the runtime cost of this change; measuring the whole 
build time is quite uninteresting, the interesting bit is measuring the 
time to build e.g. an .a library on its own. So after a full build, I do 
"rm libavcodec/libavcodec.a; time make libavcodec/libavcodec.a". This 
change raises that time from ~3.5 seconds to ~3.8 seconds. However do note 
that this is on a quite slow system in itself; without the "rm", it takes 
make 2.3 seconds just to figure out that nothing needs to be done.

So on that level, the change indeed is mostly tolerable.

However - this is very quick as long as "echo" is a shell builtin. If 
"echo" turns out to be an external executable instead of the shell 
builtin (which we can simulate by calling "/usr/bin/echo" instead of 
"echo"), then this suddenly takes >16 seconds rather than the earlier <4 
seconds. And that's quite a steep price to pay.

As noted before, this is only a fix for a potential, hypothetical problem. 
The fix is inexpensive in the case of a builtin echo, where we don't need 
the fix anyway. For the case of an external echo, where we potentially 
could need the fix, the fix is quite expensive though.

But even with the external /usr/bin/echo (on msys2), I still can produce a 
very long (>32k) .objs file with only one single invocation of 
/usr/bin/echo. So we don't actually have this problem even in that case.

So given that there are multiple concerns about the performance about 
this, and the problem that it tries to fix is entirely hypothetical at the 
moment, I would suggest that we skip this fix for now.

If someone actually manages to hit the problem in some setup and can tell 
us about it, we could reconsider of course.

// Martin

_______________________________________________
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".