From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Samuel Wales" Subject: Re: ido slow for outline path completion Date: Fri, 19 Dec 2008 15:32:28 -0700 Message-ID: <20524da70812191432u332b9316p291ee9bba954a664@mail.gmail.com> References: <20524da70812121204x9a23736g5a03f8a04d8213d5@mail.gmail.com> <67E6FD56-F95F-4EEB-8BC3-4ED566B2ECAB@uva.nl> <20524da70812181557m79252c30hc941fe5965f917e8@mail.gmail.com> <79368DAE-A865-485B-B0A3-E7952C80940B@uva.nl> <20524da70812191004t4d12921csf79c84ae0107efbf@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDnta-0007j4-Ho for emacs-orgmode@gnu.org; Fri, 19 Dec 2008 17:32:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDntZ-0007i4-Fo for emacs-orgmode@gnu.org; Fri, 19 Dec 2008 17:32:33 -0500 Received: from [199.232.76.173] (port=46796 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDntZ-0007hv-8L for emacs-orgmode@gnu.org; Fri, 19 Dec 2008 17:32:33 -0500 Received: from mail-bw0-f12.google.com ([209.85.218.12]:42940) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LDntY-0005mL-H6 for emacs-orgmode@gnu.org; Fri, 19 Dec 2008 17:32:33 -0500 Received: by bwz5 with SMTP id 5so2492944bwz.18 for ; Fri, 19 Dec 2008 14:32:29 -0800 (PST) In-Reply-To: <20524da70812191004t4d12921csf79c84ae0107efbf@mail.gmail.com> Content-Disposition: inline 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@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org *** ido Hi Carsten, Thanks for looking at the speed issues. This time an error showed up. The error from the messages buffer is: Getting targets...done eq: Wrong type argument: arrayp, (#("footodo/... The trigger is: org-goto, same settings as before, searching for a headline called "parsing risk", which does exist but never shows up as the main candidate. I did load-file on ido.el and org.el for a better backtrace. I don't know the meanings of the different color patterns in ido, and this might be a hint for speed, or this error, or both. p -- shows an entry in body text face with a ^ with a red background, rest of candidates are in red, fast. pa -- same but with different entry par -- same but with different entry pars -- only one candidate shows and it is in green, fast parsi -- back to the first color pattern, different entry, slightly slower parsin -- same entry as parsi, slightly slower parsing -- same but with different entry, slower still (but only a few seconds for me; maybe not noticeable on your computer) parsing (space after g) -- causes error, space not inserted, fast I append the backtrace. It isn't perfect. I deleted a small number of lines that had the entire completion list in them (the whole backtrace is 700k) and had to minorly obfuscate a line for privacy, but did so in a consistent way. ido-auto-merge-delay-time might or might not be relevant. I have it set to the default of 0.7. Thanks. ===== The backtrace is: aref((#("footodo/mumble/issues/is froz bar foo something risking/" 0 6 (face org-level-1 org-category "todo-foo" fontified t) 6 7 nil 7 13 (face org-level-1 org-category #("mumble" 0 6 ...) fontified t) 13 14 nil 14 20 (face org-level-1 org-category #("mumble" 0 6 ...) fontified t) 20 21 nil 21 64 (org-category #("mumble" 0 6 ...) fontified nil) 64 65 nil) "/Users/foo/Desktop/a/quux/todo-foo.org" "^\\*\\*\\*\\*\\*\\*\\* TODO is froz bar foo something risking[ ]*$" 17576) 3) (eq (aref s l) 47) (and (> l 0) (eq (aref s l) 47)) (if (and (> l 0) (eq ... 47)) (substring s 0 l) s) (let ((l ...)) (if (and ... ...) (substring s 0 l) s)) ido-no-final-slash((#("... (string-lessp (ido-no-final-slash a) (ido-no-final-slash b)) ido-file-lessp((#("... sort(((#("... (let ((completion-list ...)) (if (featurep ...) (let ... ...) (display-completion-list completion-list))) (with-output-to-temp-buffer ido-completion-buffer (let (...) (if ... ... ...))) (if display-it (with-output-to-temp-buffer ido-completion-buffer (let ... ...))) (let ((temp-buf ...) display-it full-list) (if (and ... temp-buf) (let ... ... ... ... ... ...) (setq display-it t)) (if display-it (with-output-to-temp-buffer ido-completion-buffer ...))) ido-completion-help() call-interactively(ido-completion-help) (if (and (not ...) (not ...)) (progn (setq ido-rescan ...) (delete-region ... ...) (insert res)) (call-interactively (setq this-command ido-cannot-complete-command))) (cond (ido-incomplete-regexp) ((and ... ...) (let ... ...)) (ido-directory-too-big (setq ido-directory-too-big nil) (setq ido-text-init ido-text) (setq ido-exit ...) (exit-minibuffer)) ((not ido-matches) (when ido-completion-buffer ...)) ((and ... ... ...) (if ... ... ... ... ...)) (t (setq res ido-common-match-string) (if ... ... ...))) (let (res) (cond (ido-incomplete-regexp) (... ...) (ido-directory-too-big ... ... ... ...) (... ...) (... ...) (t ... ...))) ido-complete() (if (and (stringp ido-common-match-string) (stringp ido-text) (cond ... ... ...)) (insert " ") (ido-complete)) ido-complete-space() call-interactively(ido-complete-space) completing-read("Goto: " (("dummy" . 1)) nil nil nil org-refile-history) (catch (quote ido) (completing-read (ido-make-prompt item prompt) (quote ...) nil nil (prog1 ido-text-init ...) history)) (setq ido-final-text (catch (quote ido) (completing-read ... ... nil nil ... history))) (let ((minibuffer-local-completion-map ...) (minibuffer-local-filename-completion-map ...) (max-mini-window-height ...) (ido-completing-read t) (ido-require-match require-match) (ido-use-mycompletion-depth ...) (show-paren-mode nil)) (setq ido-exit nil) (setq ido-final-text (catch ... ...))) (while (not done) (ido-trace " _LOOP_" ido-text-init) (setq ido-exit nil) (setq ido-rescan t) (setq ido-rotate nil) (setq ido-text "") (when ido-set-default-item (setq ido-default-item ...) (if ... ...) (ido-trace "new default" ido-default-item) (if ido-default-item ...) (setq ido-set-default-item nil)) (if ido-process-ignore-lists-inhibit (setq ido-process-ignore-lists nil)) (if (and ido-use-merged-list ... ...) (let ... ... ...)) (cond (ido-keep-item-list ...) (... ...) (... ...) (... ...) (... ...) (t nil)) (setq ido-rotate-temp nil) (if ido-process-ignore-lists-inhibit (setq ido-process-ignore-lists t ido-process-ignore-lists-inhibit nil)) (ido-set-matches) (if (and ido-matches ...) (setq ido-try-merged-list t)) (let (... ... ... ... ... ... ...) (setq ido-exit nil) (setq ido-final-text ...)) (ido-trace "completing-read" ido-final-text) (if (get-buffer ido-completion-buffer) (kill-buffer ido-completion-buffer)) (ido-trace " _EXIT_" ido-exit) (cond (... ... nil) (... ...) (... ... nil) (... ...) (... ...) (... ...) (... ... ...) (... ... ...) (... ...) (t ... ...))) (let ((ido-cur-item item) (ido-entry-buffer ...) (ido-process-ignore-lists t) (ido-process-ignore-lists-inhibit nil) (ido-set-default-item t) ido-default-item ido-selected ido-final-text (done nil) (icomplete-mode nil) ido-cur-list ido-ignored-list (ido-rotate-temp nil) (ido-keep-item-list nil) (ido-use-merged-list nil) (ido-try-merged-list t) (ido-pre-merge-state nil) (ido-case-fold ido-case-fold) (ido-enable-prefix ido-enable-prefix) (ido-enable-regexp ido-enable-regexp)) (ido-setup-completion-map) (setq ido-text-init initial) (setq ido-input-stack nil) (run-hooks (quote ido-setup-hook)) (while (not done) (ido-trace " _LOOP_" ido-text-init) (setq ido-exit nil) (setq ido-rescan t) (setq ido-rotate nil) (setq ido-text "") (when ido-set-default-item ... ... ... ... ...) (if ido-process-ignore-lists-inhibit ...) (if ... ...) (cond ... ... ... ... ... ...) (setq ido-rotate-temp nil) (if ido-process-ignore-lists-inhibit ...) (ido-set-matches) (if ... ...) (let ... ... ...) (ido-trace "completing-read" ido-final-text) (if ... ...) (ido-trace " _EXIT_" ido-exit) (cond ... ... ... ... ... ... ... ... ... ...)) ido-selected) ido-read-internal(list "Goto: " org-refile-history nil t nil) (let ((ido-current-directory nil) (ido-directory-nonreadable nil) (ido-directory-too-big nil) (ido-context-switch-command ...) (ido-choice-list choices)) (ido-read-internal (quote list) prompt hist def require-match initial-input)) ... (if (and org-completion-use-ido (fboundp ...) (boundp ...) ido-mode (listp ...)) (apply (quote ido-completing-read) (concat ...) (cdr args)) (apply (quote completing-read) args)) ... (let* ((cbuf ...) (cfunc ...) (extra ...) (filename ...) (tbl ...) (completion-ignore-case t)) (assoc (funcall cfunc prompt tbl nil t nil ...) tbl)) org-refile-get-location("Goto: ") (nth 3 (org-refile-get-location "Goto: ")) (if (eq interface (quote outline)) (car (org-get-location ... org-goto-help)) (nth 3 (org-refile-get-location "Goto: "))) (let* ((org-refile-targets ...) (org-refile-use-outline-path t) (interface ...) (org-goto-start-pos ...) (selected-point ...)) (if selected-point (progn ... ... ...) (message "Quit"))) org-goto(nil) call-interactively(org-goto)