From: Lluís <xscript@gmx.net>
To: emacs-devel@gnu.org
Subject: dbus-call-method blocks for a long time
Date: Thu, 14 Feb 2013 20:04:41 +0100 [thread overview]
Message-ID: <87r4kiiunq.fsf@fimbulvetr.bsc.es> (raw)
I'm not quite sure if this is an issue with `notifications' but this piece of
code is getting my emacs completely frozen for a while every time it calls
`notifications-notify' (sometimes not even C-g gets out of it):
#v+
(defun gnus-notifications-notify (from subject photo-file)
"Send a notification about a new mail.
Return a notification id if any, or t on success."
(if (fboundp 'notifications-notify)
(gnus-funcall-no-warning
'notifications-notify
:title from
:body subject
:actions '("read" "Read")
:on-action 'gnus-notifications-action
:app-icon (gnus-funcall-no-warning
'image-search-load-path "gnus/gnus.png")
:app-name "Gnus"
:category "email.arrived"
:timeout gnus-notifications-timeout
:image-path photo-file)
(message "New message from %s: %s" from subject)
;; Don't return an id
t))
#v-
This is what `elp-results' gave me:
gnus-notifications 1 150.11820929 150.11820929
gnus-notifications-notify 3 150.09452521 50.031508405
notifications-notify 3 150.09438033 50.031460111
dbus-call-method 6 150.09408380 25.015680634
dbus-get-name-owner 3 75.051887114 25.017295704
gnus-notifications-get-photo-file 3 0.0023640640 0.0007880213
gnus-notifications-get-photo 3 0.002331871 0.0007772903
dbus-message-internal 6 0.0006671940 0.0001111990
dbus-handle-event 6 0.000134238 2.2373e-05
dbus-call-method-handler 6 8.296...e-05 1.382...e-05
dbus-event-serial-number 6 2.388e-05 3.98e-06
dbus-event-bus-name 6 2.042...e-05 3.403...e-06
dbus-check-event 20 1.7564e-05 8.782e-07
Looks strange to me that `dbus-call-method' takes so long while the notification
message appears immediately on my screen.
Does this sound like a problem in Emacs's DBus immplementation, or should I
rather look in another direction?
This is using Julien's emacs-snapshot (24.3.50.1) version 2:20130207-1.
Thanks,
Lluis
--
"And it's much the same thing with knowledge, for whenever you learn
something new, the whole world becomes that much richer."
-- The Princess of Pure Reason, as told by Norton Juster in The Phantom
Tollbooth
next reply other threads:[~2013-02-14 19:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 19:04 Lluís [this message]
2013-02-15 10:48 ` dbus-call-method blocks for a long time Michael Albinus
2013-02-15 17:43 ` Lluís
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4kiiunq.fsf@fimbulvetr.bsc.es \
--to=xscript@gmx.net \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.