emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATH] Speedups to org-table-recalculate


From: Nathaniel Flath
Subject: Re: [O] [PATH] Speedups to org-table-recalculate
Date: Sat, 25 Oct 2014 17:27:25 -0700

Hi Michael

On Mon, Oct 20, 2014 at 12:41 PM, Michael Brand <address@hidden> wrote:
Hi Nathaniel

On Mon, Oct 20, 2014 at 3:56 AM, Nathaniel Flath <address@hidden> wrote:
> Thanks for the review! Updated patches attached.  I believe I've fixed
> everything you mentioned -

Yes, thank you. I tried them out.

> let me know if I missed something.

> Subject: [PATCH 1/2] org-table.el: Add early return check to
>  org-table-recalculate

> Subject: [PATCH 2/2] org-table.el: Print far fewer messages when recalculating
>  tables.

http://orgmode.org/worg/org-contribute.html
says: Line 2 is an empty line.

I try to limit my commit subjects to 50 chars which is a rule for some
projects and helpful for e. g. git log with certain options.

OK, will fix these in next set of pathces.

> +            (and all (org-table-execute-once-per-second
> +                      log-last-time
> +                      (message
> +                       "Re-applying formulas to full table...(line %d)"
> +                       (setq cnt (1+ cnt)))))

Before trying out I have overseen it, setq does not increment on each
line any more so it has to move before
org-table-execute-once-per-second. Now probably better wrapped in a
`when' instead of the original `and' with an added `progn'.

OK, good catch

> +        (org-table-execute-once-per-second
> +         log-first-time
> +         (message "Re-applying formulas...done" cnt))

cnt is superfluous.

OK.
 

Only during trying out I noticed: This message could still be kept as
a feedback at least for single row updates, like e. g. Tab on a row
with "#" in the first column, by changing log-first-time to (when all
log-first-time).

Or more conservative why not leave this message unconditional to avoid
that any user could complain for any use case that all feedback
messages disappeared like it would be the case for e. g. the typical
"C-c C-c" on TBLFM? I think that would be a simple, safe compromise.

I'm fine with adding the (when all log-first-time).  I don't want to leave it
unconditional because as we discussed before, one message in my case
 significantly slows down the table recalculation - and if there has
 been no feedback then we are dealing with a small case where it could be significant.
 

Otherwise the right but not so simple thing to do would be to log this
message for a simple "C-c C-c" on TBLFM and to not log it for only
those cases that throw after other feedback messages like e. g.
sometimes "C-u C-u C-c C-c" on TBLFM ("Table was already stable"), M-x
org-table-iterate-buffer-tables and more. These repetition intensive
use cases are the only ones that can profit noticeable from the
conditional removal of this last message, aren't they?

I got tired of having to force tables to be reformated, so I advised
 org-cycle to always recalculate a table, so I notice whenever I'm in a table.

Michael


reply via email to

[Prev in Thread] Current Thread [Next in Thread]