all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dbus-call-method takes a minimum of 100ms per call?!
@ 2014-02-17  5:15 Daniel Colascione
  2014-02-17 10:56 ` Daniel Colascione
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Colascione @ 2014-02-17  5:15 UTC (permalink / raw)
  To: Emacs developers

It looks like Emacs executes dbus calls by starting an asynchronous 
call, then checking every 100ms for it to finish. This strategy makes 
(require 'secrets) take 1000ms to complete on my machine!

Inside dbus-call-method, there's a loop that looks like this:

(with-timeout ((if timeout (/ timeout 1000.0) 25))
       (while (eq (gethash key dbus-return-values-table :ignore) :ignore)
	(let ((event (let ((inhibit-redisplay t) unread-command-events)
		       (read-event nil nil 0.1))))
	  (when (and event (not (ignore-errors (dbus-check-event event))))
	    (setq unread-command-events
		  (append unread-command-events (list event)))))))

I think we're supposed to exit as soon as we get a dbus event and 
short-circuit the timeout, but no such event seems to get delivered, 
even for successful calls. I can dig a bit into dbusbind.c, but I'm no 
dbus expert.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-12-13  0:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17  5:15 dbus-call-method takes a minimum of 100ms per call?! Daniel Colascione
2014-02-17 10:56 ` Daniel Colascione
2014-02-17 11:17   ` bug#16775: dbus interacts poorly with lisp-level event loops Daniel Colascione
2014-02-17 13:27     ` Michael Albinus
2014-02-17 13:52       ` Daniel Colascione
2014-02-17 15:07         ` Michael Albinus
2014-02-17 15:22           ` Daniel Colascione
2014-02-17 15:57             ` Michael Albinus
2014-03-26 13:10               ` Michael Albinus
2016-12-13  0:15                 ` Glenn Morris

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.