[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reducing the sit-for time in w3m-process-wait-process
- From: David Engster <deng@xxxxxxxxxxxxxxx>
- Date: Sun, 30 Nov 2008 11:34:25 +0100
- X-ml-name: emacs-w3m
- X-mail-count: 10468
I'm using the encapsulate-images feature from the shimbun package, and I
noticed that when an article contains many images, it takes pretty long
for w3m to fetch them. It seems to me this time is almost entirely spend
on the '(sit-for 1)' in w3m-process-wait-process, while the actual w3m
process is already finished. When I change this to '(sit-for 0.1)',
fetching the images is much faster. It also seems to me that this speeds
up refreshing shimbun groups in general.
The doc-string for 'sit-for' says that not every OS supports waiting the
fraction of a second, and that on such systems the value will be rounded
down (in this case to 0). I never encountered such a system, but if you
want to be on the safe side, I guess you could check for this via
(condition-case nil
(sleep-for 0 100)
;; Emacs was built without USECS
(sleep-for 1))
Regards,
David