emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Rainer Stengele <rainer.stengele@online.de>, emacs-orgmode@gnu.org
Subject: Re: commenting out a SCHEDULED line does not remove todo from agenda.
Date: Thu, 17 Jan 2013 03:54:13 -0500	[thread overview]
Message-ID: <17512.1358412853@alphaville> (raw)
In-Reply-To: Message from Carsten Dominik <carsten.dominik@gmail.com> of "Thu, 17 Jan 2013 07:41:36 +0100." <717C030F-136F-46CA-B0C0-5F9CB3560921@gmail.com>

Carsten Dominik <carsten.dominik@gmail.com> wrote:

> 
> On 17.1.2013, at 06:02, Nick Dokos <nicholas.dokos@hp.com> wrote:
> 
> > ...
> > It sets p to the point at the beginning of the line and then
> > checks if the character after it is '#'. Only then does it skip
> > the entry.
> 
> And this is done for speed.  Maybe Moore's law has progressed enough to relax this assumption?
> 

For me, probably yes: my agenda is fairly simple. More complicated
agendas still seem to take a fairly substantial time to construct
however - Bastien spent considerable effort recently to speed up the
agenda and might look askance at any attempt to slow it down :-)

But actual numbers would carry more weight than any guesses I might
make.  Here is a (probably stupid) implementation of the generalized
mechanism.  In org-agenda-skip, replace

     (if (equal (char-after p) ?#) (throw :skip t))

with

     (save-excursion
      (goto-char p)
      (skip-chars-forward "[:blank:]")
      (if (equal (char-after) ?#) (throw :skip t)))

Assuming it's correct (and no better implementation is suggested), maybe
somebody with a time-consuming agenda can try profiling with and without
the generalized mechanism and let us know.

I tried with my agenda which calls org-agenda-skip 5768 times. Without
the mod, they took 0.13s; with the mod, they took 0.19s, so that's a 50%
increase - but the overall time was actually shorter in the second case:
1.64s vs 1.72s.  The data look noisy however (I only tried it once in
each case) so it's hard to say anything meaningful. I'd need to run many
more experiments before I'd trust these numbers.

Nick

  reply	other threads:[~2013-01-17  8:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 14:27 commenting out a SCHEDULED line does not remove todo from agenda Rainer Stengele
2013-01-16 16:49 ` Markus Heller
2013-01-16 16:57   ` Rainer Stengele
2013-01-16 17:40     ` Markus Heller
2013-01-16 17:48 ` Nick Dokos
2013-01-17  5:02   ` Nick Dokos
2013-01-17  6:41     ` Carsten Dominik
2013-01-17  8:54       ` Nick Dokos [this message]
2013-01-17  9:44         ` Rainer Stengele
2013-01-22 15:43           ` Bastien
2013-01-22 17:26             ` Rainer Stengele
2013-01-17 11:42         ` Carsten Dominik
2013-01-17 15:47           ` Nick Dokos
2013-01-17 21:42             ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17512.1358412853@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rainer.stengele@online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).