[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
debug performance problem
From: |
David Ponce |
Subject: |
debug performance problem |
Date: |
Fri, 14 Dec 2001 17:40:22 +0100 |
Hi All,
I got a problem with the debugger which is extremely slow when I use
it to debug programs with big data structures (large vectors and/or
lists). In such cases it takes about 20 to 30 seconds each time the
debugger is entering! So it is practically impossible to do step by
step execution :(
The debugger don't have this problem in 20.7 nor in vanilla 21.1.
After some investigation I found the culprit: it is the new function
`debugger-make-xrefs' which takes a lot of time to update a big
debugger buffer (because of big data structures)!
Just overriding that function to do nothing fixed the problem.
May be it would be nice if the xref feature could be globally
disabled of automatically disabled depending on the size of the
debugger buffer? Here is a sample patch.
Hope this will help.
David
*** debug.el.ori Fri Nov 9 21:03:30 2001
--- debug.el Fri Dec 14 17:23:38 2001
***************
*** 58,63 ****
--- 58,77 ----
:type 'boolean
:group 'debugger)
+ (defcustom debugger-make-xref-flag nil
+ "In non-nil enable cross-references in the debugger buffer."
+ :type 'boolean
+ :group 'debugger)
+
+ (defcustom debugger-make-xref-maximum-size nil
+ "*Maximum size of the debugger buffer for cross-references.
+ Create cross-references in the debugger buffer only if its size is
+ less than this. If nil, means size is irrelevant. See also the
+ option `debugger-make-xref-flag'."
+ :type '(choice (const :tag "none" nil)
+ (integer :tag "size"))
+ :group 'debugger)
+
(defvar debugger-value nil
"This is the value for the debugger to return, when it returns.")
***************
*** 268,274 ****
(cdr debugger-args) debugger-args)
(current-buffer))
(insert ?\n)))
! (debugger-make-xrefs))
(defun debugger-make-xrefs (&optional buffer)
"Create cross-references in the debugger buffer."
--- 282,291 ----
(cdr debugger-args) debugger-args)
(current-buffer))
(insert ?\n)))
! (if (and debugger-make-xref-flag
! (or (not debugger-make-xref-maximum-size)
! (< (buffer-size) debugger-make-xref-maximum-size)))
! (debugger-make-xrefs)))
(defun debugger-make-xrefs (&optional buffer)
"Create cross-references in the debugger buffer."
____________________________________________________________
Faites un voeu et puis Voila ! www.voila.fr
Avec Voila Mail, consultez vos e-mails sur votre mobile Wap.
- debug performance problem,
David Ponce <=