Slow backtraces

Edi Weitz <[email protected]> Thu, 10 Jun 2004 11:32:55 +0200
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
Hi!

In my little web framework TBNL[1] I use the following function to get
a backtrace programmatically:

  #+:allegro
  (defun get-backtrace (error)
    (with-output-to-string (s)
      (with-standard-io-syntax
        (let ((*print-readably* nil)
              (*print-miser-width* 40)
              (*print-pretty* t)
              (tpl:*zoom-print-circle* t)
              (tpl:*zoom-print-level* nil)
              (tpl:*zoom-print-length* nil))
          (ignore-errors
            (format *terminal-io* "~
  ~@<An unhandled error condition has been signalled:~3I ~a~I~:@>~%~%"
                    error))
          (ignore-errors
            (let ((*terminal-io* s)
                  (*standard-output* s))
              (tpl:do-command "zoom" :from-read-eval-print-loop nil
                                     :count t
                                     :all t)))))))

This was taken from autozoom.cl as advised in the docs. While this
usually works fine there are some situations where getting the
backtrace takes rather long - up to two or three seconds while the app
is otherwise extremely snappy.

I'd like to come up with a simple case to demonstrate this but I can't
- for some errors it happens, for some it doesn't.

Is there anything I have to watch out for? Is it expected that getting
a backtrace might take that long under certain circumstances?

I'm using the 7.0 beta on Linux.

Thanks,
Edi.

[1] <http://weitz.de/tbnl/>