emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: C-c C-c in table takes 12 seconds (was: yasnippet and Org-mode)
Date: Sun, 23 Nov 2014 13:48:33 +0100	[thread overview]
Message-ID: <2014-11-23T13-45-08@devnull.Karl-Voit.at> (raw)
In-Reply-To: 2014-11-23T13-27-20@devnull.Karl-Voit.at

Hm. Maybe I wrongly suspected yasnippet:

* Karl Voit <devnull@Karl-Voit.at> wrote:
>
> Background with a specific issue:
>
> Issue: Whenever I change table cells via TAB, it takes twelve
> seconds with 100% CPU core:
>
> org-table-next-field very slow:
> #+BEGIN_EXAMPLE
> - command-execute                           31397  99%
>  - call-interactively                       31397  99%
>   - yas-expand                              31298  98%
>    - yas--fallback                          31298  98%
>     - call-interactively                    31298  98%
>      - org-cycle                            31298  98%
>       - call-interactively                  31291  98%
>        - org-table-next-field               31291  98%
>         - org-table-align                   15676  49%
>          + org-activate-bracket-links          36   0%
> [...]
> #+END_EXAMPLE
>
> In org-table-next-field I suspect the re-calculation process. And
> yes, also the simple ~C-c C-c~ on a table takes very long. Even
> within the primitive table "| |".
>
> Profiling the re-calculation ends up with:
> #+BEGIN_EXAMPLE
> - command-execute                             43157  99%
>  - call-interactively                         43157  99%
>   - yas-expand                                31871  73%
>    - yas--fallback                            31871  73%
>     - call-interactively                      31871  73%
>      - org-cycle                              31871  73%
>       - call-interactively                    31864  73%
>        - org-table-next-field                 31864  73%
>         - org-table-align                     15782  36%
>          - org-activate-bracket-links            46   0%
> [...]
> #+END_EXAMPLE
>
> So I guess that yas-expand has a certain role in this drama.

Hm, I have to admit I forgot to test without yas-minor-mode (silly
me):

#+BEGIN_EXAMPLE
- command-execute                              10993  99%
 - call-interactively                          10993  99%
  - org-ctrl-c-ctrl-c                          10905  99%
     org-table-align                            5450  49%
   + run-hook-with-args-until-success              6   0%
  + byte-code                                     34   0%
  + minibuffer-complete                           26   0%
  + previous-line                                 18   0%
  + execute-extended-command                      10   0%
+ timer-event-handler                              6   0%
+ redisplay_internal (C function)                  3   0%
+ ...                                              0   0%
#+END_EXAMPLE

Well, this does not involve yasnippet and also lasts too long :-(

How about this?

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github

  reply	other threads:[~2014-11-23 12:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-23 12:41 yasnippet and Org-mode: depressing relationship Karl Voit
2014-11-23 12:48 ` Karl Voit [this message]
2014-11-23 16:58   ` C-c C-c in table takes 12 seconds Nicolas Goaziou
2014-11-23 17:08     ` Rasmus
2014-11-23 18:03       ` Nicolas Goaziou
2014-11-23 18:14         ` Rasmus
2014-11-23 18:19           ` Nicolas Goaziou
2014-11-23 17:28     ` Karl Voit
2014-11-23 19:04       ` Bernt Hansen

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=2014-11-23T13-45-08@devnull.Karl-Voit.at \
    --to=devnull@karl-voit.at \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@Karl-Voit.at \
    /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).