From mboxrd@z Thu Jan 1 00:00:00 1970 From: d@teklibre.org (Dave =?utf-8?Q?T=C3=A4ht?=) Subject: Scaling org-mode Date: Sat, 12 Sep 2009 23:45:11 -0600 Message-ID: <87my4zfleg.fsf@mahal.sjds.teklibre.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MmhuY-0000cT-Aw for emacs-orgmode@gnu.org; Sun, 13 Sep 2009 01:46:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MmhuR-0000Uc-U4 for emacs-orgmode@gnu.org; Sun, 13 Sep 2009 01:46:04 -0400 Received: from [199.232.76.173] (port=53651 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmhuR-0000UL-Mk for emacs-orgmode@gnu.org; Sun, 13 Sep 2009 01:45:59 -0400 Received: from toutatis.isc.org ([149.20.54.64]:56939 helo=mainmail.teklibre.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MmhuR-0004P0-2M for emacs-orgmode@gnu.org; Sun, 13 Sep 2009 01:45:59 -0400 Received: from localhost (localhost [127.0.0.1]) by mainmail.teklibre.org (Postfix) with ESMTP id BE9CC12B783 for ; Sat, 12 Sep 2009 22:46:35 -0700 (PDT) Received: from mainmail.teklibre.org ([127.0.0.1]) by localhost (toutatis.sql1.isc.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p47vqhcDv3HA for ; Sat, 12 Sep 2009 22:46:35 -0700 (PDT) Received: from mail3.teklibre.org (mail3.teklibre.org [IPv6:2001:470:b9d7::31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail3.teklibre.org", Issuer "CA Cert Signing Authority" (verified OK)) by mainmail.teklibre.org (Postfix) with ESMTPS id 2547C12B784 for ; Sat, 12 Sep 2009 22:46:35 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org -----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+ iEYEARECAAYFAkqshuUACgkQpdejJcOV4uRkTwCgyz5IMWJTzCHa8CmUAgU/fyIa cvwAoJKQ5Gr+1vlSAbEfbKob76xJIvB8 =/Xdv -----END PGP SIGNATURE-----