From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id jQz6B73+MWCVOwAA0tVLHw (envelope-from ) for ; Sun, 21 Feb 2021 06:33:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UPYkA73+MWCjLwAAbx9fmQ (envelope-from ) for ; Sun, 21 Feb 2021 06:33:33 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5E95F2FEDE for ; Sun, 21 Feb 2021 07:33:32 +0100 (CET) Received: from localhost ([::1]:50184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDiJ9-00037b-8V for larch@yhetil.org; Sun, 21 Feb 2021 01:33:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDiHt-00035B-Ku for emacs-orgmode@gnu.org; Sun, 21 Feb 2021 01:32:13 -0500 Received: from out2.migadu.com ([2001:41d0:2:aacc::]:52911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDiHr-0004dT-LQ for emacs-orgmode@gnu.org; Sun, 21 Feb 2021 01:32:13 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1613889129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RMx5pFCgL2U2KV5mvX5amEsGrKT0dpJDbEyQkUZ9Vn4=; b=Nu/ZVvzW89xwWmAmuYngoiFe/Qc2s5uLP9x4Vv/J6gXRFsocan3f16/uAhsDMiVj8l5GCB ANmDtQt/N28J61VcVoa97fuoDAYl3qZL9LlzHPEkL84vpW4fFcWOLepXPhShdJ1KhNn0SQ cIKnngX/d40ED9RwBDpMtxlKjCN5RjBf6/oqZvBbPICfHTY1vALKWr49wI8UiQC35+v0Nx O1Bx0irdKMK+56skkcdTQJYYtKDup8i9IAGXVFTkRWJjDBIcviNctiZupzsPivNWqOGAxT sKAQ+/TzJ7az15y8JmqdtYBBD+ezn8sQv3x2SJvSDpo8jNwB29YuqXVsNbXINA== From: Kyle Meyer To: Ag Ibragimov Subject: Re: org-agenda-list should respect org-agenda-max-entries In-Reply-To: References: Date: Sun, 21 Feb 2021 01:32:07 -0500 Message-ID: <87tuq6hqxk.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=kyle@kyleam.com; helo=out2.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.57 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b="Nu/ZVvzW"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 5E95F2FEDE X-Spam-Score: -2.57 X-Migadu-Scanner: scn1.migadu.com X-TUID: Ls7UsinBcpxN Ag Ibragimov writes: > While going through the source code, I've noticed that org-agenda-list > scans all the files in org-agenda-files and processes all Org items > those files contain. > > However, it seems when org-agenda-max-entries or org-agenda-max-todos > are not nil, it still processes every entry, and only after building > the agenda it reduces the number of items in the list. It's okay, but > if you have lots of files and tons of entries, it seems to be waste of > time and resources. Hmm, it seems that org-agenda-finalize-entries sorts all the entries before looking at org-agenda-max-entries and org-agenda-max-todos (which makes sense), so wouldn't it generally need the entire set?