emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: d@teklibre.org (Dave Täht)
To: emacs-orgmode@gnu.org
Subject: Scaling org-mode
Date: Sat, 12 Sep 2009 23:45:11 -0600	[thread overview]
Message-ID: <87my4zfleg.fsf@mahal.sjds.teklibre.org> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I have really been enjoying importing my life into org-mode, which I've
been doing for about two months now. 

But.

It currently visits about 100 files and 10k of text to construct the
agenda. It's starting to get kind of slow and interrupt my workflow,
particularly the background process that scans them. 

While the system is effectively frozen, my message buffer fills up with
messages about setting the flyspell dictionary to en, etc. This is quite
annoying with text to speech turned on. I ended up just having appts
spoken.

;; quick hack for saying announcements, need more thought turned into it.

(when window-system
  (defun dtaht/say-stuff (id msg &optional delay vattrib hattrib font) 
    "Speak a message msg. Currently requires say.el"
    (unless vattrib (setq vattrib "top"))
    (unless hattrib (setq hattrib "right"))
    (unless delay (setq delay 5000))
    (unless font (setq font "Arial 12"))
    (save-window-excursion
      (say (dtaht/ssml-escape msg)
	))))

;; my personal fav, run every 15 minutes

(defun nag-timer () "Nag me when there isn't a clock running"  
  (interactive)
  (unless (marker-buffer org-clock-marker)
    (say "Are you mating now?")))

It gets a bit chunky even when all the org files are in memory (and I
have gobs of memory).

Solution #1) cut the number of files down - is a good one. I probably
can cut those files easily in half right now. The problem is that I have
about 600 more files to import (scenes from a book), and I really like
the idea of being able to know what my characters are doing in 2023, and
separate files was kind of useful at one point.

That's a couple hundred k of text (what I have in there now is mostly
"normal" items for managing my personal and professional life)

Solution #2) Make org-mode faster. I am compiling and installing
org-mode from git at the moment. So it's compiled. I have a lot of hooks
installed for text buffers - At minimum, auto-capitalize, flyspell, yas,
wrap, and abbrev. Most (all?) of those are compiled, too, but aren't
needed to be run or initialized when merely being visited.

so thought 1) would be to come up with some sort of text mode hook that
only hooks in when a human is viewing or editing the buffer, not when it
is happening programmatically.

so thought 2) would be to have it only attempt to construct background
agendas when the system is otherwise idle for a few minutes. I don't
know how to do that, I figure wrapping this bit with something that
could detect idleness instead of just running arbitrarily would be good.

  (run-at-time nil 3600 'org-agenda-to-appt)

don't know how to detect idleness.

And thought 0) would be to understand emacs well enough to profile
what's really going on as maybe "starting a new flyspell process" is not
really the problem but a symptom, but I don't (yet). (suggestions
desired. I have read up a bit on emacs profiling)

I am deeply grateful for the existence of org-mode and the fine work
going into it. I wrote a nice blog entry about it recently. 

http://the-edge.blogspot.com/2009/08/going-retro-re-adopting-emacs.html

TIA.

- -- 
Dave Taht
http://the-edge.blogspot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkqshuUACgkQpdejJcOV4uRkTwCgyz5IMWJTzCHa8CmUAgU/fyIa
cvwAoJKQ5Gr+1vlSAbEfbKob76xJIvB8
=/Xdv
-----END PGP SIGNATURE-----

             reply	other threads:[~2009-09-13  5:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-13  5:45 Dave Täht [this message]
2009-09-13 14:04 ` Scaling org-mode Matt Lundin
2009-09-13 17:25   ` Dave Täht
2009-09-13 18:58     ` Dave Täht
2009-09-13 16:52 ` Nick Dokos
2009-09-13 23:30 ` Productiviy tools (was: Scaling org-mode) Daniel Clemente
2009-09-14  0:21   ` Productiviy tools Dave Täht

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=87my4zfleg.fsf@mahal.sjds.teklibre.org \
    --to=d@teklibre.org \
    --cc=emacs-orgmode@gnu.org \
    /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).