GNU bug report logs -
#34763
27.0.50; url-retrieve-synchronously misbehaves inside eldoc-documentation-function
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Tue, 5 Mar 2019 21:35:01 UTC
Severity: normal
Found in version 27.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 34763 <at> debbugs.gnu.org (full text, mbox):
On 13.03.2019 18:49, Eli Zaretskii wrote:
>> - Continue typing, pause from time to time and wait for "done" to show
>> up in the echo area. After a little while, it will stop arriving,
>> because the requests will stall for some reason.
>
> They don't stall here, they just take more time to complete.
How much more time? In my current testing, it can go up 20x. And maybe more.
So normally all 10 requests to GOOG complete in 1.1s (meaning 0.11s per
request), but after some typing, it slows down and takes ~20s. That's
~1.8s per request.
At the same time, if I open a second instance of Emacs and try the
scenario there, the requests start out slow already (same as in the
already open instance).
But at the same time, opening www.google.com in Firefox is still fast.
As well as doing it from a console with CURL ('time curl
http://www.google.com' shows 0.3s).
Sounds like an external library problem, maybe?
> If you do the same from an interactive function, not from eldoc, does
> the problem happen there as well?
More or less. I managed to make it slower by ~20x as well.
Try this:
(defun silly-eldoc ()
(let ((start (time-to-seconds)))
(dotimes (i 10)
(url-retrieve-synchronously "http://www.google.com")
(message "try %i" i))
(format "done in %f" (- (time-to-seconds) start))))
(defun silly-command ()
(interactive)
(message "%s" (silly-eldoc)))
(global-set-key (kbd "C-o") #'silly-command)
Call the command a few time with C-o, it should run the timer and finish
with calculation how much time it took to run the requests. Now:
1. Alternate between pressing C-o and C-g, with varying speeds.
The goal is to see
error in process filter: Transfer interrupted!
error in process filter: url-http-generic-filter: Transfer interrupted!
a few times.
2. Then see if C-o still runs to completion. If it does, and does not
look slow enough, repeat 1.
BUT! I have tried to reproduce this slowdown behavior with a local
server, and so far no luck. Ping to Google (or almost any other website)
is 100ms from my current location, so maybe it makes a difference.
This bug report was last modified 6 years and 3 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.