emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: Emacs Org mode <emacs-orgmode@gnu.org>
Subject: Re: Possible cache problems
Date: Tue, 2 Jun 2015 23:21:11 +0200	[thread overview]
Message-ID: <20150602212111.GA3455@chitra.no-ip.org> (raw)
In-Reply-To: <87d21dsvox.fsf@nicolasgoaziou.fr>

Hi Nicolas,

On Tue, Jun 02, 2015 at 10:26:54PM +0200, Nicolas Goaziou wrote:
> Hello,
> 
> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> 
> > I have been noticing a strange heisenbug.  From time to time, Org starts
> > eating CPU for certain specific tasks: org-end-of-line, fill-paragraph,
> > folding or unfolding trees, or adding/changing properties with
> > org-set-property.  However these happen only after I have been using Org
> > for a while.
> 
> This is typical for cache breakage.

Okay, good that it is not as mysterious as I was thinking :).

> > I think I also see similar CPU eating symptoms when I have buffers
> > editing version controlled files.  I have auto-revert-mode enabled for
> > files under version control, I think that is related.  I'm not entirely
> > sure though, I don't know how to narrow it down either.
> >
> > I say it is cache related since all this magically goes away, once I go
> > to the top of my current tree, and call org-element-cache-reset.
> > However, once the symptoms start showing, it happens more frequently
> > despite my cache resets.
> 
> Usually, a cache breakage is a specific action applied to some specific
> document structure that induces an incorrect computation of the parts of
> the cache to clear and to update.
> 
> If you encountered the problem, it means the problematic document
> structure is already in the current buffer. So, the chances are high
> that you will repeat the problematic editing action on it again, even
> after resetting the cache. IOW, all the ingredients are there for the
> problem to repeat again and again.
> 
> Finding the problematic action is not easy. I wrote a basic minor mode
> (element-debug-mode) for that: after each change to the buffer, it
> checks if the cache and pending updates match the parse tree. It sends
> a message anytime they differ, which happens as soon as a problematic
> action was triggered.

I have enabled the mode on my document.  Let's see how this goes.  Btw,
since you warn against large documents, would it help if I narrowed a
large document before enabling the mode?

Thanks a lot :).

-- 
Suvayu

Open source is the future. It sets us free.

  reply	other threads:[~2015-06-02 21:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 17:09 Possible cache problems Suvayu Ali
2015-06-02 20:26 ` Nicolas Goaziou
2015-06-02 21:21   ` Suvayu Ali [this message]
2015-06-02 21:27     ` Nicolas Goaziou
2015-06-02 21:35       ` Suvayu Ali
2015-06-06 19:38       ` Suvayu Ali
2015-06-06 23:29         ` Nicolas Goaziou
2015-06-07  3:39           ` Suvayu Ali
2015-06-10  8:40           ` Suvayu Ali
2015-06-10 21:41             ` Rasmus
2015-06-11  7:00             ` Nicolas Goaziou
2015-06-11 15:06               ` Suvayu Ali
2015-06-14 12:58             ` Nicolas Goaziou
2015-06-15  1:21               ` Suvayu Ali

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=20150602212111.GA3455@chitra.no-ip.org \
    --to=fatkasuvayu+linux@gmail.com \
    --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).