From 18913660c8707b4c488fc210d4fafc037528b206 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Thu, 23 Sep 2010 00:33:05 +0200 Subject: [PATCH] Add tracing for performance debugging. --- lisp/ChangeLog | 3 +++ lisp/gnus-int.el | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6470f975b..299a5e31b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-09-22 Lars Magne Ingebrigtsen + * gnus-int.el (gnus-open-server): Add tracing for performance + debugging. + * gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el index 406304490..df7f979d5 100644 --- a/lisp/gnus-int.el +++ b/lisp/gnus-int.el @@ -226,10 +226,18 @@ If it is down, start it up (again)." (eq (nth 1 (assoc method gnus-opened-servers)) 'denied)) +(defvar gnus-backend-trace t) + (defun gnus-open-server (gnus-command-method) "Open a connection to GNUS-COMMAND-METHOD." (when (stringp gnus-command-method) (setq gnus-command-method (gnus-server-to-method gnus-command-method))) + (when gnus-backend-trace + (with-current-buffer (get-buffer-create "*gnus trace*") + (buffer-disable-undo) + (goto-char (point-max)) + (insert (format-time-string "%H:%M:%S") + (format " %S\n" gnus-command-method)))) (let ((elem (assoc gnus-command-method gnus-opened-servers)) (server (gnus-method-to-server-name gnus-command-method))) ;; If this method was previously denied, we just return nil. -- 2.25.1