unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: dancol@dancol.org
To: "Daniel Colascione" <dancol@dancol.org>
Cc: Michael Albinus <michael.albinus@gmx.de>, emacs-devel@gnu.org
Subject: Re: trunk r116456: Improve dbus performance on synchronous calls
Date: Mon, 17 Feb 2014 16:41:51 -0000	[thread overview]
Message-ID: <b4dbd4f6e9992f52298d5f0f8d607f6c.squirrel@dancol.org> (raw)
In-Reply-To: <53023627.1060001@dancol.org>

> On 02/17/2014 08:06 AM, Michael Albinus wrote:
>> Daniel Colascione <dan.colascione@gmail.com> writes:
>>
>>>       (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)))))))
>>> +        (let ((event (let ((inhibit-redisplay t)
>>> unread-command-events)
>>> +		       (read-event nil nil check-interval))))
>>> +          (when event
>>> +            (push event unread-command-events))
>>> +          (when (< check-interval 1)
>>> +            (setf check-interval (* check-interval 1.05))))))
>>
>> Why `push'? It adds the event on top of `unread-command-events',
>> changing the event order when there are already events in that list.
>
> Hrm. I was getting it from sit-for:

Nope. You're right: fixed. Thanks for pointing that out.

> Speaking of which, shouldn't the dbus code just look like this?

No, that won't work. It's single-shot.





  reply	other threads:[~2014-02-17 16:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1WFMaG-0002WV-8L@vcs.savannah.gnu.org>
2014-02-17 16:06 ` trunk r116456: Improve dbus performance on synchronous calls Michael Albinus
2014-02-17 16:17   ` Daniel Colascione
2014-02-17 16:41     ` dancol [this message]
2014-02-17 21:08       ` Michael Albinus
2014-02-17 21:42         ` Daniel Colascione
2014-02-18  0:00         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4dbd4f6e9992f52298d5f0f8d607f6c.squirrel@dancol.org \
    --to=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).