Mark H Weaver skribis: > ludo@gnu.org (Ludovic Courtès) writes: > >> I just noticed that our HTTP client is very slow. Consider this: >> >> (use-modules (web client) >> (rnrs io ports) >> (rnrs bytevectors) >> (srfi srfi-11) >> (ice-9 format)) >> >> (define %uri >> "http://ftp.gnu.org/gnu/idutils/idutils-4.6.tar.xz") >> >> (with-fluids ((%default-port-encoding #f)) >> (let*-values (((start) >> (gettimeofday)) >> ((p) >> (let ((s (open-socket-for-uri %uri))) >> (setvbuf s _IONBF) > > Why are you using an unbuffered port? On my system, changing this to > _IOFBF increases throughput from 326 KiB/s to 489.0 KiB/s. Arf, that’s because I was also forcing the ‘scm_c_read’ hack (which is currently never used, and this is a bug):