emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Noboru Ota <me@nobiot.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org, salutis@me.com
Subject: Re: Radio links work only in small numbers
Date: Thu, 29 Feb 2024 17:47:07 +0100	[thread overview]
Message-ID: <86frxbb4l0.fsf@nobiot.com> (raw)
In-Reply-To: <87cysfo78x.fsf@localhost>

Ihor Radchenko <yantar92@posteo.net> writes:
> Thanks for testing!
> Applied, onto main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=341a01a07
> Fixed.

You're very welcome. This is amazing. Thank you so much. I have rebased
the source to the latest main and also tested with 10,000 dummy entries.
The target links still work!

> See the docstring of `org-target-link-regexp-limit'. The hard limit is
> MAX_BUF_SIZE in src/regex-emacs.c, but that's after the regexp is
> compiled (AFAIU). So, the real limit is smaller and may depend on
> regexp complexity.

Thank you for the detail.

I do not need to understand all the technical detail here, but for
future reference and if you have the time, let me ask this -- please try
not to waste your time answering.

- MAX_BUF_SIZE in src/regex-emacs.c is, if I understand the comment
  around it correctly, 2^15 bytes = 32768 bytes.

- `org-target-link-regexp-limit` is 2^11 bytes = 2048 bytes (?).

- For my 5000 terms, (length org-target-link-regexp) => 103603 (what's
  the unit of measure?)

- (string-bytes org-target-link-regexp) => 103603, the same number.

- If I evaluate the following to try to get a compiled length of the
  regexp, 88785.

    (let ((regexp org-target-link-regexp))
        (with-temp-file "org-target-link-regexp"
          (insert regexp)))
    (byte-compile-file "org-target-link-regexp")
    (file-attribute-size (file-attributes "org-target-link-regexp.elc"))

- For 10000 dummy terms, (length org-target-link-regexp) => 228848.

The numbers I get seem to be much greater than 2048 (bytes?) and 32768
bytes....

My test with 10,000 terms is more than sufficient to cover my needs, so
please do not feel obliged to answer this technical part -- someone else
might want to jump in to help :)

– nobiot


  reply	other threads:[~2024-02-29 16:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 23:10 Radio links work only in small numbers Rudolf Adamkovič
2022-12-14  8:30 ` Ihor Radchenko
2022-12-14 15:29   ` Rudolf Adamkovič
2022-12-14 15:47 ` Max Nikulin
2022-12-14 16:02   ` Ihor Radchenko
2022-12-20  3:21     ` Timothy
2022-12-20  1:00   ` Rudolf Adamkovič
2022-12-28  9:46 ` Daniel Clemente
2024-02-19  9:26 ` Ihor Radchenko
2024-02-28 16:33   ` nobiot
2024-02-28 17:14     ` Ihor Radchenko
2024-02-28 22:18       ` Noboru Ota
2024-02-29 11:11         ` Ihor Radchenko
2024-02-29 16:47           ` Noboru Ota [this message]
2024-02-29 17:21             ` Ihor Radchenko
2024-02-29 17:44               ` Noboru Ota
2024-04-04 20:20           ` Rudolf Adamkovič

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=86frxbb4l0.fsf@nobiot.com \
    --to=me@nobiot.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=salutis@me.com \
    --cc=yantar92@posteo.net \
    /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).