From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFD63CD4F25 for ; Fri, 15 May 2026 17:46:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id BD50241D92; Fri, 15 May 2026 17:46:39 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id kCilb9lg-0CO; Fri, 15 May 2026 17:46:38 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D102141D4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=buildroot.org; s=default; t=1778867198; bh=NUd6z/0Bf7sXc08y3CQw7HOGHrEiDw7R5R7ZHucYteA=; h=To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=pmM5V1ARGl2N1VV1Iw7gQl8Xob9n3Ipr05NvEQ9cOVG4uodEfPrs42dGGwhLNf7SO sc754oK3QUl7XYC/RQBGh6hI2riJY9HGVbiiPXRTBPIWu0RpWhq8+3QyrdhpTE4va9 QIL2TI8PLJa2q2TZGPR8WP5zJG9hdmvz9BLplXBLbJa1PhsMrdw/INbu+fvyBNCRau GAl2N2+UuyzJaWbNqUpm2xbgN7BxLZPIb+VU5LS3TTmeEbppPRq+rNYKOyzYRX3fmd mMoe3RQOF1+sPnhKBqEZ8rdfLNUTK3MY5ei28waWqhoxBQt7gLS3mfOAC7fN/NS0zA Yb9WNcQiRk0pA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id D102141D4E; Fri, 15 May 2026 17:46:38 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists1.osuosl.org (Postfix) with ESMTP id D451223F for ; Fri, 15 May 2026 17:46:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B8A2861623 for ; Fri, 15 May 2026 17:46:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id a6eblN1cnRUJ for ; Fri, 15 May 2026 17:46:35 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::32e; helo=mail-wm1-x32e.google.com; envelope-from=thomas.perale@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org CBEC561697 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org CBEC561697 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by smtp3.osuosl.org (Postfix) with ESMTPS id CBEC561697 for ; Fri, 15 May 2026 17:46:34 +0000 (UTC) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-488af9fdaa7so449515e9.1 for ; Fri, 15 May 2026 10:46:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778867193; x=1779471993; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=N+Uox1OOb5elubTJTEBEyVUTQ/bK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AEGCBowrozj4jn9Zbl8D5mq5aogj36oGwMbasfkz X-Received: by 2002:a05:600c:3104:b0:488:ab1d:dcc5 with SMTP id 5b1f17b1804b1-48fe651b57fmr66857285e9.27.1778867192870; Fri, 15 May 2026 10:46:32 -0700 (PDT) Received: from arch (94.105.117.13.dyn.edpnet.net. [94.105.117.13]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe4c833fcsm72277315e9.2.2026.05.15.10.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 10:46:32 -0700 (PDT) To: Fiona Klute Cc: Thomas Perale , buildroot@buildroot.org Date: Fri, 15 May 2026 19:46:32 +0200 Message-ID: <20260515174632.529941-1-thomas.perale@mind.be> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260426153334.1026982-6-fiona.klute@gmx.de> References: <20260426153334.1026982-6-fiona.klute@gmx.de> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1778867193; x=1779471993; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N+Uox1OOb5elubTJTEBEyVUTQ/bKay25EVJwR1bm/eg=; b=U84UoUnu0xf/96nzW7p0eMHcEHxk4liAwQgS9mKxEHNNYBwV+8e1jHe1dKoIF2sNmC yFxi7YU/R+v+MFRbzYEdd8YeSNOdeKKzy03LsZ/r4jZ8v43CqxaivBM9pb2zpcZBbRM+ uC2LbRZD/2cYWhWEZfCetpavs0XORFTIdDIGbDKSap1m8fX4gTqD+jCd+i429wvZnUgR lu1LghilT8kwd8SAlWXRrL3n5s7+DSAXXpau92znuiJxCw85z4wgnUGVwHnFD/pGaEF5 jCMORILAmY5CB0OGDEMwU2hGdVC/pZl76AvDc3AMWGe9zMuFqqEal9CU7ZOK7GzHh0r8 nn8A== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=U84UoUnu Subject: Re: [Buildroot] [PATCH v2 5/6] support/scripts/pkg-stats: don't buffer whole file searching for infra X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Thomas Perale via buildroot Reply-To: Thomas Perale Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" In reply of: > The file handle can be iterated over directly and each line is used > exactly once, so the only effect of reading all lines into a list > first was higher memory use and complexity. > > Signed-off-by: Fiona Klute Applied to 2025.02.x & 2026.02.x. Thanks > --- > support/scripts/pkg-stats | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats > index bbd1e3e6f0..5dcc812e2b 100755 > --- a/support/scripts/pkg-stats > +++ b/support/scripts/pkg-stats > @@ -197,8 +197,7 @@ class Package: > > self.infras = list() > with open(self.pkgfile, 'r') as f: > - lines = f.readlines() > - for line in lines: > + for line in f: > match = INFRA_RE.match(line) > if not match: > continue > -- > 2.53.0 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot