emacs-devel
[Top][All Lists]
Advanced

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

Re: trunk r116456: Improve dbus performance on synchronous calls


From: dancol
Subject: Re: trunk r116456: Improve dbus performance on synchronous calls
Date: Mon, 17 Feb 2014 16:41:51 -0000
User-agent: SquirrelMail/1.4.23 [SVN]

> On 02/17/2014 08:06 AM, Michael Albinus wrote:
>> Daniel Colascione <address@hidden> 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 via email to

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