emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* refile too slow
       [not found] <CAJcAo8uE4_eTDPdticnkXuTk1nNDasPLYLPR=Tdp-_1UJJsABA@mail.gmail.com>
@ 2017-09-30 23:59 ` Samuel Wales
  2017-10-05 14:43   ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Wales @ 2017-09-30 23:59 UTC (permalink / raw)
  To: emacs-orgmode

recent maint, but been a problem for a few mo.

refile hits a wall.  depends on number of headers.

i think delete-dups is suspicious here.  is its only purpose to
eliminate the existing
header?

   - org-refile                                                47808  91%
     - org-refile-get-location                                  47780  91%
      - org-refile-get-targets                                  44120  84%
         delete-dups                                            36613  70%
         match-string-no-properties                               548   1%

-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.



-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: refile too slow
  2017-09-30 23:59 ` refile too slow Samuel Wales
@ 2017-10-05 14:43   ` Nicolas Goaziou
  2017-10-05 22:30     ` Samuel Wales
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2017-10-05 14:43 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hello,

Samuel Wales <samologist@gmail.com> writes:

> recent maint, but been a problem for a few mo.
>
> refile hits a wall.  depends on number of headers.
>
> i think delete-dups is suspicious here.  is its only purpose to
> eliminate the existing
> header?

Why is delete-dups suspicious? Have you got a very large number of
refile locations? If so, would it make sense to refine your target
definitions?

Its purpose, as its name suggests, is to remove duplicate refile
locations you could get.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: refile too slow
  2017-10-05 14:43   ` Nicolas Goaziou
@ 2017-10-05 22:30     ` Samuel Wales
  2017-10-25  3:04       ` Samuel Wales
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Wales @ 2017-10-05 22:30 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 10/5/17, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> i think delete-dups is suspicious here.  is its only purpose to
>
> Why is delete-dups suspicious? Have you got a very large number of
> refile locations? If so, would it make sense to refine your target
> definitions?

already do that.  my fallback "get most things down to a reasonable
level" refile and refile goto were ok until recently.  then they
became untenably slow.  i can't refine it more without missing stuff
that i need.

> Its purpose, as its name suggests, is to remove duplicate refile
> locations you could get.

so only useful if i set the variable with duplicate stuff?

===

delete-dups seems suspicious but what do i know.  i wonder if
cl-delete-duplicates is more efficient.

(defun delete-dups (list)
  "Destructively remove `equal' duplicates from LIST.
Store the result in LIST and return it.  LIST must be a proper list.
Of several `equal' occurrences of an element in LIST, the first
one is kept."
  (let ((tail list))
    (while tail
      (setcdr tail (delete (car tail) (cdr tail)))
      (setq tail (cdr tail))))
  list)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: refile too slow
  2017-10-05 22:30     ` Samuel Wales
@ 2017-10-25  3:04       ` Samuel Wales
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Wales @ 2017-10-25  3:04 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 10/5/17, Samuel Wales <samologist@gmail.com> wrote:
> delete-dups seems suspicious but what do i know.  i wonder if
> cl-delete-duplicates is more efficient.

perhaps it has been made more efficient in new emacs versions than 24?

>
> (defun delete-dups (list)
>   "Destructively remove `equal' duplicates from LIST.
> Store the result in LIST and return it.  LIST must be a proper list.
> Of several `equal' occurrences of an element in LIST, the first
> one is kept."
>   (let ((tail list))
>     (while tail
>       (setcdr tail (delete (car tail) (cdr tail)))
>       (setq tail (cdr tail))))
>   list)
>


-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-25  3:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAJcAo8uE4_eTDPdticnkXuTk1nNDasPLYLPR=Tdp-_1UJJsABA@mail.gmail.com>
2017-09-30 23:59 ` refile too slow Samuel Wales
2017-10-05 14:43   ` Nicolas Goaziou
2017-10-05 22:30     ` Samuel Wales
2017-10-25  3:04       ` Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).