[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dbus-call-method blocks for a long time

From: Lluís
Subject: dbus-call-method blocks for a long time
Date: Thu, 14 Feb 2013 20:04:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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):

(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)
       :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

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 ( version 2:20130207-1.


 "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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]