GNU bug report logs - #71367
30.0.50; ELPA package breadcrumb causes Emacs freeze when editing json file

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Tue, 4 Jun 2024 19:42:01 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #20 received at 71367 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 71367 <at> debbugs.gnu.org, Andrea Corallo <acorallo <at> gnu.org>, theo <at> thornhill.no,
 tsdh <at> gnu.org
Subject: Re: bug#71367: 30.0.50; ELPA package breadcrumb causes Emacs freeze
 when editing json file
Date: Thu, 6 Jun 2024 11:07:54 +0100
> Maybe João could suggest some trick or user option to cut down that
> initial time to reasonable level.

No, but feel free to profile and suggest Elisp changes or algorithmic
changes.  Maybe the vconcat re-allocations in breadcrumb--ipath-plain
re-allocations are to blame?  It's O(N^2) allocations I think.  What's
the length of bc--ipath-plain?  17500ish?  If so, then the thing would
be to reserve some space in the vector upfront, but I don't know how
to do that easily in Elisp (in CL there's VECTOR-PUSH and
VECTOR-PUSH-EXTEND).  Or maybe the vector could be list instead, though
that would possibly slow down things elsewhere.

I'm of course just guessing and leaving these notes for the curious, I
won't be tackling this myself.

> Failing that, I suggest not to
> enable breadcrumb-mode in such large JSON buffers (something that can
> be done in a mode hook, I guess?)

Yes, there is `breadcrumb-local-mode`.




This bug report was last modified 1 year and 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.