The Lambda Lab
/
projects
/
elpher.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7f5edc5
)
Gemini download performance optimization.
author
Tim Vaughan
<timv@ughan.xyz>
Fri, 15 May 2020 16:58:33 +0000
(18:58 +0200)
committer
Tim Vaughan
<timv@ughan.xyz>
Fri, 15 May 2020 16:58:33 +0000
(18:58 +0200)
elpher.el
patch
|
blob
|
history
diff --git
a/elpher.el
b/elpher.el
index
b02cbbc
..
be78a0a
100644
(file)
--- a/
elpher.el
+++ b/
elpher.el
@@
-811,7
+811,7
@@
to ADDRESS."
(let* ((kill-buffer-query-functions nil)
(port (elpher-address-port address))
(host (elpher-address-host address))
(let* ((kill-buffer-query-functions nil)
(port (elpher-address-port address))
(host (elpher-address-host address))
- (response-string
""
)
+ (response-string
-parts nil
)
(proc (open-network-stream "elpher-process"
nil
(if force-ipv4 (dns-query host) host)
(proc (open-network-stream "elpher-process"
nil
(if force-ipv4 (dns-query host) host)
@@
-832,8
+832,8
@@
to ADDRESS."
(when timer
(cancel-timer timer)
(setq timer nil))
(when timer
(cancel-timer timer)
(setq timer nil))
- (setq response-string
- (con
cat response-string string
))))
+ (setq response-string
-parts
+ (con
s string response-string-parts
))))
(set-process-sentinel proc
(lambda (proc event)
(condition-case the-error
(set-process-sentinel proc
(lambda (proc event)
(condition-case the-error
@@
-845,7
+845,7
@@
to ADDRESS."
(concat (elpher-address-to-url address)
"\r\n"))))
((string-prefix-p "deleted" event)) ; do nothing
(concat (elpher-address-to-url address)
"\r\n"))))
((string-prefix-p "deleted" event)) ; do nothing
- ((and (
string-empty-p response-string
)
+ ((and (
not response-string-parts
)
(not force-ipv4))
; Try again with IPv4
(message "Connection failed. Retrying with IPv4.")
(not force-ipv4))
; Try again with IPv4
(message "Connection failed. Retrying with IPv4.")
@@
-853,7
+853,7
@@
to ADDRESS."
(elpher-get-gemini-response address renderer t))
(t
(funcall #'elpher-process-gemini-response
(elpher-get-gemini-response address renderer t))
(t
(funcall #'elpher-process-gemini-response
- response-string
+ (apply #'concat (reverse response-string-parts))
renderer)
(elpher-restore-pos)))
(error
renderer)
(elpher-restore-pos)))
(error