emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vladimir Nikishkin <lockywolf@gmail.com>
To: Vladimir Nikishkin <lockywolf@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Bug: org-babel-expand-noweb-references is very slow [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]
Date: Thu, 9 Jan 2020 09:41:00 +0800	[thread overview]
Message-ID: <CA+A2iZbQYXuv+G=e0ivDcXx4+TCacYtPyhJwi_1=-LSnnr8u2g@mail.gmail.com> (raw)
In-Reply-To: <871rs9g8w1.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]

Ouch, that was unexpected.

The manual for my version only includes four mentions if the noweb-ref
header argument. Is it becoming deprecated?

What does "apparently don't need" actually mean? That is, when should I use
the name, and when the header argument? What can the header argument do
that the name cannot?


Nicolas Goaziou <mail@nicolasgoaziou.fr> 於 2020年1月9日 週四 01:23 寫道:

> Hello,
>
> Vladimir Nikishkin <lockywolf@gmail.com> writes:
>
> > I am attaching the file in which tangling is still slow.
> >
> > The file is quite big, but that alone doesn't seem to be the reason
> > for slowliness (I tried adding 1M-long words in the random places of
> > the previous mwe).
> >
> > You can see the result by C-c C-v C-v'ing the code block at the
> > "Ramanujan numbers" heading.
> >
> > Below is the profiler report for C-c C-v C-v'ing.with the heaviest
> > blocks expanded:
>
> This is because you're using :noweb-ref, which _is_ slow, although you
> apparently don't need it in the document. Use name keyword instead,
> e.g.,
>
>     #+name: primetest
>     #+begin_src scheme :exports both :results output
>       (define (smallest-divisor n)
>         (find-divisor n 2))
>       (define (find-divisor n test-divisor)
>         (cond ((> (square test-divisor) n) n)
>           ((divides? test-divisor n) test-divisor)
>           (else (find-divisor n (+ test-divisor 1)))))
>       (define (divides? a b) (= (remainder b a) 0))
>
>       (define (prime? n)
>         (= n (smallest-divisor n)))
>     #+end_src
>
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 2277 bytes --]

  reply	other threads:[~2020-01-09  1:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14  7:04 Bug: org-babel-expand-noweb-references is very slow [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)] Vladimir Nikishkin
2019-10-14 15:03 ` Nicolas Goaziou
     [not found]   ` <CA+A2iZascDYc2mZfxy_dPSm9f-+_vJ9R+kVdNW_C7MMoOimMnA@mail.gmail.com>
     [not found]     ` <87v9sp9ejl.fsf@nicolasgoaziou.fr>
     [not found]       ` <CA+A2iZZ=gTstVgyzNqi73ysTzRnh5C4GVcmTf6EbEr5mUiRD2w@mail.gmail.com>
     [not found]         ` <87y2ujr198.fsf@nicolasgoaziou.fr>
2020-01-08  2:18           ` Vladimir Nikishkin
2020-01-08 17:23             ` Nicolas Goaziou
2020-01-09  1:41               ` Vladimir Nikishkin [this message]
2020-01-09  8:45                 ` Diego Zamboni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+A2iZbQYXuv+G=e0ivDcXx4+TCacYtPyhJwi_1=-LSnnr8u2g@mail.gmail.com' \
    --to=lockywolf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).