no title added by anonymous on Thu Apr 15 20:32:12 2021

;;; myfile.txt is 1.3MB and has 25361 lines

(define lines 
  (call-with-input-file "myfile.txt"
    (lambda (port) 
      (intersperse (read-lines port) "\n"))))
(apply string-append lines) ; Takes forever

(define lines 
  (call-with-input-file "myfile.txt"
    (lambda (port) 
      read-lines port))))
(apply string-append (intersperse lines "\n")) ; Takes forever

(define lines 
  (call-with-input-file "myfile.txt"
    (lambda (port) 
      read-lines port))))
(apply string-append lines) ; Works fine