From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Behavior of Gnus when called from an hyperlink Date: Fri, 16 Jul 2010 21:51:32 +0200 Message-ID: <878w5bkxx7.fsf@mundaneum.com> References: <87r5jrcx9g.fsf@mundaneum.com> <8763138nna.fsf@thinkpad.tsdh.de> <87ocev5pn3.fsf@mundaneum.com> <87fx071fsg.fsf@mundaneum.com> <23582.1277735944@gamaville.dokosmarshall.org> <87vd936wiq.fsf@mundaneum.com> <87eifr3t52.fsf@thinkpad.tsdh.de> <87vd8gcu6k.fsf@mundaneum.com> <87oce7j26i.fsf@thinkpad.tsdh.de> <87fwzjfyf8.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Tassilo, > Tassilo Horn wrote: >> S=C3=A9bastien Vauban writes: >> >>> I've followed Nick's procedure, hoping to get even more details: >>> >>> --8<---------------cut here---------------start------------->8--- >>> Function Name Call Count Elapsed Time Average Time >>> ... >>> gnus-request-head 1 312.993525 312.993525 >>> gnus-activate-group 1 13.587475 13.587475 >>> gnus-group-read-group 1 7.949638 7.949638 >>> ... >>> --8<---------------cut here---------------end--------------->8--- >> >> Looks to me that `gnus-request-head' is the culprit. Looking at the code= , I >> cannot see why that function is so slow. I'd try to edebug that to see w= hat >> exact part of it takes that long. > > Sorry to be such a newbie on that, but I'd understood I would have to type > `C-u C-M-x' (`edebug-defun') when on that function definition, right? > > My problem is I can't access the definition, as all of Gnus is only prese= nt > as "byte-compiled" files, located in > > /usr/share/emacs/23.1/lisp/ > > Is there a way, still, to debug the function, then, the way you intend it? Thanks to Nick, got access to the sources, and could edebug-defun the funct= ion `gnus-request-head': --8<---------------cut here---------------start------------->8--- (defun gnus-request-head (article group) "Request the head of ARTICLE in GROUP." (let* ((gnus-command-method (gnus-find-method-for-group group)) (head (gnus-get-function gnus-command-method 'request-head t)) res clean-up) (cond ;; Check the cache. ((and gnus-use-cache (numberp article) (gnus-cache-request-article article group)) (setq res (cons group article) clean-up t)) ;; Check the agent cache. ((gnus-agent-request-article article group) (setq res (cons group article) clean-up t)) ;; Use `head' function. ((fboundp head) (setq res (funcall head article (gnus-group-real-name group) (nth 1 gnus-command-method)))) ;; Use `article' function. (t (setq res (gnus-request-article article group) clean-up t))) (when clean-up (save-excursion (set-buffer nntp-server-buffer) (goto-char (point-min)) (when (search-forward "\n\n" nil t) (delete-region (1- (point)) (point-max))) (nnheader-fold-continuation-lines))) res)) --8<---------------cut here---------------end--------------->8--- When stepping with SPC, the "arrow mark" (in the left fringe) stayed 5 mins= on line 487: --8<---------------cut here---------------start------------->8--- ;; Use `head' function. ((fboundp head) (setq res (funcall head article (gnus-group-real-name group) > (nth 1 gnus-command-method)))) ^ cursor after first paren --8<---------------cut here---------------end--------------->8--- If I understand well, it wasted all the time evaluating --8<---------------cut here---------------start------------->8--- (nth 1 gnus-command-method) --8<---------------cut here---------------end--------------->8--- I can't understand anything from the above... Someone does? Thanks in advance! Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode