From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: orgmode and physical fitness training Date: Fri, 07 Nov 2008 10:02:19 -0800 Message-ID: <87r65nwh1w.fsf@gmail.com> References: <1223994514.15613.17.camel@monad.lab> <87abceez2z.fsf@abc.se> <87abccu71x.fsf@gmail.com> <87od0rl8w3.fsf@abc.se> 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 1KyVex-0001r7-UB for emacs-orgmode@gnu.org; Fri, 07 Nov 2008 13:02:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KyVet-0001qU-RD for emacs-orgmode@gnu.org; Fri, 07 Nov 2008 13:02:15 -0500 Received: from [199.232.76.173] (port=45187 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyVet-0001qR-Nk for emacs-orgmode@gnu.org; Fri, 07 Nov 2008 13:02:11 -0500 In-Reply-To: <87od0rl8w3.fsf@abc.se> (Mikael Fornius's message of "Fri, 07 Nov 2008 18:54:04 +0100") 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: Mikael Fornius Cc: David O'Toole , emacs-orgmode@gnu.org Mikael Fornius writes: > Thanks for org-collector.el, now I have read it and tried it out. > > It is very nice to have the possibility to evaluate lisp expressions as > values, that is something missing in org-columns! > I'm happy someone else is finding it useful! > > But it was only a few seconds faster than column-view and column dblock > and therefore not fast enough for my slow computer ;-). I timed it to 62 > seconds to insert exercise data table for one year (83 headings) with 4 > columns and no calculations. > > * ELP Profiling Results > > |---------------------------+-------+--------------+--------------| > | org-dblock-write:propview | 1 | 62.158395 | 62.158395 | > | org-propview-collect | 1 | 60.578724 | 60.578724 | > | org-map-entries | 1 | 60.519551 | 60.519551 | > | org-scan-tags | 1 | 60.267157 | 60.267157 | > | org-entry-properties | 94 | 57.451918999 | 0.6111906276 | > | org-get-tags-at | 94 | 54.069399999 | 0.5752063829 | > | org-up-heading-all | 365 | 53.664638999 | 0.1470264082 | > | outline-up-heading | 365 | 53.647627 | 0.1469798 | > | outline-previous-heading | 29751 | 39.418412999 | 0.0013249441 | > | org-outline-level | 30306 | 6.0971540000 | 0.0002011863 | > | org-split-string | 555 | 2.0629750000 | 0.0037170720 | > |---------------------------+-------+--------------+--------------| > > It is clear from above who is the time thief. > Speeding up these functions would also pay off if/when org-mode is used on more portable handheld computers. > > Attaches diff if interested :-) Thanks, I will certainly apply this to org-collector.el. In fact if you would be interested in collaborating on this tool --for speed, stability, cleaner arguments and results printing-- I could upload this to worg where we could both make changes. Best -- Eric > > *** /home/mfo/org/org-collector.el~ 2008-11-07 17:19:12.000000000 +0100 > --- /home/mfo/org/org-collector.el 2008-11-07 18:14:23.000000000 +0100 > *************** > *** 27,45 **** > Otherwise if prop looks like a list (meaning it starts with a > '(') then read it as lisp, otherwise return it unmodified as a > string." > ! (if (stringp prop) > ! (if prop > ! (let ((out (string-to-number prop))) > ! (if (equal out 0) > ! (if (or (equal "(" (substring prop 0 1)) (equal "'" (substring prop 0 1))) > ! (read prop) > ! (if (string-match "^\\(+0\\|-0\\|0\\)$" prop) > ! 0 > ! (progn (set-text-properties 0 (length prop) nil prop) > ! prop))) > ! out)) > ! nil) > ! prop)) > > (defun org-dblock-write:propview (params) > "collect the column specification from the #+cols line > --- 27,43 ---- > Otherwise if prop looks like a list (meaning it starts with a > '(') then read it as lisp, otherwise return it unmodified as a > string." > ! (if (and (stringp prop) (not (equal prop ""))) > ! (let ((out (string-to-number prop))) > ! (if (equal out 0) > ! (if (or (equal "(" (substring prop 0 1)) (equal "'" (substring prop 0 1))) > ! (read prop) > ! (if (string-match "^\\(+0\\|-0\\|0\\)$" prop) > ! 0 > ! (progn (set-text-properties 0 (length prop) nil prop) > ! prop))) > ! out)) > ! prop)) > > (defun org-dblock-write:propview (params) > "collect the column specification from the #+cols line > > /Mikael Fornius