Hi Samuel,
this is deep inside the ido routines, and I do not have enough insight to see what is going on. Maybe send a bug report to Kim? Maybe you can create a test case for him by capturing the table before it is passed to the ido-complete command?
If it is really the length of the strings, a uniquify-like solution might be workable, but constructing the uniquify list may be slow as well..... I am putting this on my list, but not for the current year :-)
- Carsten On Dec 19, 2008, at 11:32 PM, Samuel Wales wrote: *** 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)
|