unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71367@debbugs.gnu.org, acorallo@gnu.org, theo@thornhill.no, tsdh@gnu.org
Subject: bug#71367: 30.0.50; ELPA package breadcrumb causes Emacs freeze when editing json file
Date: Thu, 6 Jun 2024 14:00:20 +0100	[thread overview]
Message-ID: <CALDnm515y7CHG81o1NOT=jzhGDOLw_1-O=JL9RK_4g3xvuNpsg@mail.gmail.com> (raw)
In-Reply-To: <86jzj2gtow.fsf@gnu.org>

On Thu, Jun 6, 2024 at 1:08 PM Eli Zaretskii <eliz@gnu.org> wrote:

> I don't see why using make-vector and vconcat, two existing
> primitives, would qualify as implementing something more general than
> what is needed here.

If someone uses those two primitives in the context of that
particular  algorithm, they'll likely to keep track of the capacity of
the vector saying how many things fit and the size counting how many
things are already there. You'll increment size when adding things
pushing and enlarge/reallocate when  size = capacity. By then you'll
have "open coded" VECTOR-PUSH-EXTEND or C++'s std::vector::push_back
or whatever your preferred language calls it.

João





  reply	other threads:[~2024-06-06 13:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 19:40 bug#71367: 30.0.50; ELPA package breadcrumb causes Emacs freeze when editing json file Tassilo Horn
2024-06-04 20:49 ` Andrea Corallo
2024-06-05  7:24   ` Tassilo Horn
2024-06-05  9:36     ` Andrea Corallo
2024-06-06  9:35       ` Eli Zaretskii
2024-06-06 10:07         ` João Távora
2024-06-06 11:33           ` Eli Zaretskii
2024-06-06 11:47             ` João Távora
2024-06-06 12:08               ` Eli Zaretskii
2024-06-06 13:00                 ` João Távora [this message]
2024-06-06 13:37                   ` Eli Zaretskii
2024-06-06 14:01                     ` João Távora
2024-06-06 14:29                       ` Tassilo Horn
2024-06-07 21:23 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CALDnm515y7CHG81o1NOT=jzhGDOLw_1-O=JL9RK_4g3xvuNpsg@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=71367@debbugs.gnu.org \
    --cc=acorallo@gnu.org \
    --cc=eliz@gnu.org \
    --cc=theo@thornhill.no \
    --cc=tsdh@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.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).