emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-agenda-list should respect org-agenda-max-entries
@ 2021-02-17  0:11 Ag Ibragimov
  2021-02-21  6:32 ` Kyle Meyer
  2021-04-26  8:56 ` Bastien
  0 siblings, 2 replies; 3+ messages in thread
From: Ag Ibragimov @ 2021-02-17  0:11 UTC (permalink / raw)
  To: emacs-orgmode


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.

Just wanted to bring someone's attention to that. Thank you!


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-agenda-list should respect org-agenda-max-entries
  2021-02-17  0:11 org-agenda-list should respect org-agenda-max-entries Ag Ibragimov
@ 2021-02-21  6:32 ` Kyle Meyer
  2021-04-26  8:56 ` Bastien
  1 sibling, 0 replies; 3+ messages in thread
From: Kyle Meyer @ 2021-02-21  6:32 UTC (permalink / raw)
  To: Ag Ibragimov; +Cc: emacs-orgmode

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?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-agenda-list should respect org-agenda-max-entries
  2021-02-17  0:11 org-agenda-list should respect org-agenda-max-entries Ag Ibragimov
  2021-02-21  6:32 ` Kyle Meyer
@ 2021-04-26  8:56 ` Bastien
  1 sibling, 0 replies; 3+ messages in thread
From: Bastien @ 2021-04-26  8:56 UTC (permalink / raw)
  To: Ag Ibragimov; +Cc: emacs-orgmode

Hi Ag,

Ag Ibragimov <agzam.ibragimov@gmail.com> 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.

Yes, agreed.  `org-agenda-max-entries' and `org-agenda-max-entries'
are less useful when the limitation is done *at the end* as it is now
(my bad, as I implemented this).

I would welcome a patch that take org-agenda-max-* variables into
account right after the list of agenda items has been collected and
just *before* any other filtering happens.

Let me know if this is something you can explore.  Thanks!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-26  8:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17  0:11 org-agenda-list should respect org-agenda-max-entries Ag Ibragimov
2021-02-21  6:32 ` Kyle Meyer
2021-04-26  8:56 ` Bastien

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).