From patchwork Sat Aug 25 18:11:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: avih X-Patchwork-Id: 10134 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp4716382jap; Sat, 25 Aug 2018 11:11:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaGRgSBtcZR+pv0CCYroM2UjWp0k6hvqvAT9LweoILR8r/P9vTWi2XSBetMTDtUCE63Ujbl X-Received: by 2002:a1c:6386:: with SMTP id x128-v6mr1702914wmb.104.1535220683329; Sat, 25 Aug 2018 11:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535220683; cv=none; d=google.com; s=arc-20160816; b=jURZzQSBzj2dZzYRBJy67yUECmsgsqHsfBqgEwPE1M/XEOCT/AIv/c/2GEV3S+EyQe tMpIECEud7WAipe1AR+oFiQfW4o35v6B/9Ltk3Hsxpb5ASiMsrfLP/KGw8PO9efuCOy8 et+KJ3VGCDSnU8cjVlY1nPXzubRSIf8ArRYvbe7PVRLpU62+nhimlY0sFAWZT/xYEnYa jaJJYAsXgwWnuG1JROLg36rHtMwOk3ScS7WMzfJC4DovBOmN9PsUybI7PvD75Rg191Pa e1K3W8zM/SjZOWRuqqPBf9jxi1ib00z+c5osc6B6cb7qwry263TQxdM1T8tgClzrLjKn 06Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:to:from:date :dkim-signature:delivered-to:arc-authentication-results; bh=f9Fm7aR+XWZuJRP+SxnGxwFn+dNaHQOuUQ+LEZxz5LY=; b=g4h3jJJsJogYBjY3KKgIlDMw/sCVFEUCWQCdOSknPOi+qAs0bxCkdUB4pWvYytxdIy 1q/msOq8+JcswTHGGOyFXNPOFkwqSAPbSePXnlcCHHS7jUbhCeKN2fTczlLLARvMPP6H q0S+k0fnwb5hYHGTu5VY1oGBY1/dNAeyFS4KbQMuI0s6WULxhZIgtoThdL0zHIx1XFgD Kr4A9CE0j459gag+lXSDrHHdjNU3eLf0ReEIqf39eBwk2fjLHirKc/H+e4bi0x0giMnp mhgYUNoKz+y1LnPDZTVnwe4nVhCXxA5jwO6CdV8ixnl1pFahf27NrqvhFXg5OfAoQ0EQ nlUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@yahoo.com header.s=s2048 header.b=FxdBsAjW; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d12-v6si6360074wrn.105.2018.08.25.11.11.22; Sat, 25 Aug 2018 11:11:23 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@yahoo.com header.s=s2048 header.b=FxdBsAjW; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1DBE0689904; Sat, 25 Aug 2018 21:11:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from sonic311-14.consmr.mail.bf2.yahoo.com (sonic311-14.consmr.mail.bf2.yahoo.com [74.6.131.124]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2A024680497 for ; Sat, 25 Aug 2018 21:11:12 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1535220673; bh=EuGIvKzyVuoZdKb8FGoQHl+1TvwFIr6Uk6Il67XkX2Q=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=FxdBsAjWuMXVw+/mKvIRijA363FgYXprvliC8Q/Xs06Vj6Bq4OMSksoJGeSb+EojwQBgw8ffxJmDd6gLmJ5/xyq3RSII5KcpafxE8B/I6llNQ3RGNLd+PM2SmYxZC7Y3616bN2WPuozfXAOCELPLHiL4mqkWvdZ1ymnHFrXH8nxjsVWOtZlDh6wLZx5X89zquTLBLHPwmMegRH6OY35Hsg+PCuR9qdsO8tdx2bPMJFWSvtSwyPMPWDHXzVEW6Y9MJHccfVpeV5NoIrdtdc3cXbcfqQao4KC9C+vkcMKB/vdUROVOfgbe22/dflLjsxAzKzfhzMdeK3ailCxYYY1F+A== X-YMail-OSG: Wo8VkYUVM1nTuzdGWntoBmZdYuQ_L9BDdLaPQOwonJlD4mlukGRT8bVU4RFtNUo CngcmC_Ht09aafwfUP2v4an.nOqS00Kb00vLgbeZQR04Ga26BTHPBgV5IAOH6qUyoJSFQDVLYWHN neHu_KHnXENTPdmpc.aMTegXmUtGsGxbkNtgadGUK1VrafgkMDY0zQs4Y_tnjMkV.gkHFhrsxODV jDuT1bjQ9w_j9d.Kk3dbgiS0sgERzEkA9jlpxFJYvE.Q1npGZ1lS6_eWojmlQ2SyHWnNX0Iv8LXt Q5K78hR_dqg22b5FmdlLTBFa6tGf9S8IGjjEzNMpdo24RhTV5qtaP6YiTRoRh9bPfrR.QV2Rjq4k VgjEyrE0Qd2ZPtgN.UTnjg4GcHBAmVVbORRh.F0rnENuSmkqSkFTiyGN4kdPyTEKkI9RSIk0hsO9 PzzY5dwXn1mrlIDGYyQO_B832p3X8RNqUIWctNS.3BddO1_KbLcKeKnTaVkry7YcMRFfbwN4.a4g EkbwjnvExfHSHgo7DOdlcUFlEqZ32kT8B1izJNY.e_zmH4NNigZanHEJ993zy44sC0oOFKIxmvTa uxbUVR4L0K_Z4JDyIT9ZhthQiYcYPjOYcib5h4JkfCEdZl.loaTx5frjdrgkMhtzrlu9FaIt2n3B 7akS2MTC7uA6xulePRIlpOz.MQZpYoT391PAH.t_F4hQjlFrnkXfeY1OCgwX6MfYegQzyzKdEi3J oBKTrHp4N9IlXYFK39jJ_txKeX7x0CUZ2at3nbGTaffAbsHqsZFAy4Ha48_d92z6Sr5oekx906Kz 1J7R1guMOfT4IvMlc_MglNS7IR2OP4kR030bIUFxxUP..WJpm._Z7KGjxp4DsB.hU1EXnDIh9lcu mftmzDp_TsSpHQ.NVq8JvlvT_Zmjxv9JD_bjzWRtvslBCZi42zbl6hCyrpLGkWN4DjDdkFtqY2z3 0L.XfxCBI74Ovrp8D.5Q- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.bf2.yahoo.com with HTTP; Sat, 25 Aug 2018 18:11:13 +0000 Date: Sat, 25 Aug 2018 18:11:10 +0000 (UTC) From: avih To: FFmpeg development discussions and patches Message-ID: <989623233.2592064.1535220670315@mail.yahoo.com> In-Reply-To: References: <378315057.2531045.1535207584068.ref@mail.yahoo.com> <378315057.2531045.1535207584068@mail.yahoo.com> MIME-Version: 1.0 X-Mailer: WebService/1.1.12262 YahooMailNeo Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: Re: [FFmpeg-devel] [PATCH 3/3] configure: speedup x2-x8 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" For overview see: http://ffmpeg.org/pipermail/ffmpeg-devel/2018-August/233665.html Attached is patch 3/3 which was at "main.patch" of that message. After the previous speedups, configure spent 20-60% of its runtime at check_deps(). It's particularly slow with bash. After some local optimizations - mainly avoid pushvar/popvar and abort early in one notable case (empty deps), it's now x4-x25 faster. After this patch, pushvar() and popvar() are not used but I was hesitant to remove them (nice to have). If you think it should be removed, the patch "opt2-remove-pushvar.patch" removes them. On Saturday, August 25, 2018 7:55 PM, Timo Rothenpieler wrote: Please use git send-email to send your patches, or at least send each patch, created by git format-patch, as individual attachment. Your files seem to contain multiple patches one after another, which makes them very hard to follow. But nice work! Let's hope this does not cause any regressions. From 77f897c8ed4eec9119d758037b0311629f549a5b Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Wed, 1 Aug 2018 09:10:12 +0300 Subject: [PATCH] configure: remove unused pushvar()/popvar() --- configure | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/configure b/configure index e9cb7703..d6c1d032 100755 --- a/configure +++ b/configure @@ -619,25 +619,6 @@ get_sanitized(){ eval echo \$$(sanitize_var_name "$1") } -pushvar(){ - for pvar in $*; do - eval level=\${${pvar}_level:=0} - eval ${pvar}_${level}="\$$pvar" - eval ${pvar}_level=$(($level+1)) - done -} - -popvar(){ - for pvar in $*; do - eval level=\${${pvar}_level:-0} - test $level = 0 && continue - eval level=$(($level-1)) - eval $pvar="\${${pvar}_${level}}" - eval ${pvar}_level=$level - eval unset ${pvar}_${level} - done -} - request(){ for var in $*; do eval ${var}_requested=yes -- 2.17.1