Discussion:
Profiling Slowdown when Opening Message with Many Threads
Cole Lyman
2018-11-09 23:54:38 UTC
Permalink
Hi all,

First of all, thank you so much to all of the developers that have
contributed to notmuch. I think it is a beautiful piece of software and
it has certainly made my life better.

I have an email with about 16 threads (responses back and forth 16
times, there are some pdf attachements thrown in there as well) that
takes considerable time (30 seconds to a minute) to open up using the
notmuch Emacs interface. As an aside, there are also some HTML emails in
there which I have read could be the culprit.

I have run the Emacs profiler and have attached the profiler report.
From viewing the results from the profiler, it seems that there
recursive calls to `notmuch-show-insert-thread` (one call for each
thread, I presume) and as I follow the calls down the stack it turns out
that the function `indent-rigidly` takes up 63% of the CPU cycles.

Anyone have any insight as to why this is happening or next steps that I
could try to debug this?

I am running Emacs 26.1 (with Doom, in case that matters, in the call
stack the `+mail/notmuch-show-reuse-buffer` is part of Doom) on OSX
version 10.14.1. Please let me know if any other information would be
useful!

Thank you,
Cole
Cole Lyman
2018-11-10 00:15:16 UTC
Permalink
Forgot to attach the profile.
David Edmondson
2018-11-10 11:18:47 UTC
Permalink
Post by Cole Lyman
Forgot to attach the profile.
Post by Cole Lyman
Hi all,
First of all, thank you so much to all of the developers that have
contributed to notmuch. I think it is a beautiful piece of software and
it has certainly made my life better.
I have an email with about 16 threads (responses back and forth 16
times, there are some pdf attachements thrown in there as well) that
takes considerable time (30 seconds to a minute) to open up using the
notmuch Emacs interface. As an aside, there are also some HTML emails in
there which I have read could be the culprit.
I have run the Emacs profiler and have attached the profiler report.
From viewing the results from the profiler, it seems that there
recursive calls to `notmuch-show-insert-thread` (one call for each
thread, I presume) and as I follow the calls down the stack it turns out
that the function `indent-rigidly` takes up 63% of the CPU cycles.
Anyone have any insight as to why this is happening or next steps that I
could try to debug this?
Could you figure out which of the messages is being displayed when
`indent-rigidly' uses so much CPU time?

Is the set of messages something that you could share?
Post by Cole Lyman
Post by Cole Lyman
I am running Emacs 26.1 (with Doom, in case that matters, in the call
stack the `+mail/notmuch-show-reuse-buffer` is part of Doom) on OSX
version 10.14.1. Please let me know if any other information would be
useful!
Thank you,
Cole
_______________________________________________
notmuch mailing list
https://notmuchmail.org/mailman/listinfo/notmuch
dme.
--
It's funny, I spent my whole life wanting to be talked about.
Loading...