Slowness with big list of atoms
Hello, I've noticed that Geiser is very slow on returning big lists of non-lists. Here is an example.
Start Geiser (I used
Define there a couple of auxiliary variables: a big list of strings and a big list of lists:
(define list-of-strings (make-list 5000 "foo")) (define list-of-lists (make-list 5000 '("foo")))
Define an auxiliary elisp function:
(defun geiser-simple-eval (str) (with-current-buffer (car geiser-repl--repls) (let* ((code `(:eval (:scm ,str))) (ret (geiser-eval--send/wait code))) ;; We don't even need the result, so just return nil. ;; (cdr (assq 'result ret)) nil)))
Now evaluate the following elisp expressions:
(geiser-simple-eval "list-of-lists") ; very fast (geiser-simple-eval "list-of-strings") ; very slow
For me the first expression was evaluated "instantly", while the second one took about 20 seconds (it depends on CPU of course).
I also checked lists of symbols and lists of numbers: they are also significantly slower than list of lists.