High CPU usage on Tree View with many emails

Mark Walters markwalters1009 at gmail.com
Sun Jun 25 01:28:51 PDT 2017


Hi

> When I make a query that gives many results (e.g. "review", which hits
> ~2200 emails with my Gerrit reviews) and want to display them in Tree
> View, the CPU usage stays high for several seconds.
>
> While this happens, the Emacs window flickers, like it was busy with
> redisplaying the buffer.

Yes I see this but I don't quite know why it happens. I think it is to
do with the special tree graphics characters. Two things you could try
are running emacs in a terminal, and changing the font. If you are happy
compiling from source, then you could also try changing the characters
used for the tree graphics (in emacs/notmuch-tree.el)

If you are feeling more adventurous I think the flicker is fixed in
emacs master, so emacs 26 should be OK. (*)

Best wishes

Mark

(*) For an entertaining description of quite what was needed to make
emacs double buffer its output see
https://www.facebook.com/notes/daniel-colascione/buttery-smooth-emacs/10155313440066102/




> If I pull the horizontal scroll of the Emacs
> buffer down, I can see that the buffer grows (like messages being
> inserted there). The Emacs profiler says that more than 50% of CPU
> time is spend in notmuch-tree-insert-forest-thread.
>
> Interestingly, the in the non-tree view the same query is processed in no time.
>
> Any idea?
>
> -- 
> Piotr Trojanek
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list