From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#71367: 30.0.50; ELPA package breadcrumb causes Emacs freeze when editing json file Date: Thu, 6 Jun 2024 11:07:54 +0100 Message-ID: References: <87tti8binx.fsf@fastmail.fm> <874ja7ua1m.fsf@gnu.org> <867cf2ifbp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14147"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71367@debbugs.gnu.org, Andrea Corallo , theo@thornhill.no, tsdh@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 06 12:10:34 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sFA4m-0003Tj-TI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Jun 2024 12:10:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFA46-00077y-5b; Thu, 06 Jun 2024 06:09:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFA44-000771-HI for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 06:09:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFA44-0005CL-3n for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 06:09:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFA4H-0001kS-P7 for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 06:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jun 2024 10:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71367 X-GNU-PR-Package: emacs Original-Received: via spool by 71367-submit@debbugs.gnu.org id=B71367.17176685686674 (code B ref 71367); Thu, 06 Jun 2024 10:10:01 +0000 Original-Received: (at 71367) by debbugs.gnu.org; 6 Jun 2024 10:09:28 +0000 Original-Received: from localhost ([127.0.0.1]:52449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFA3k-0001jZ-Em for submit@debbugs.gnu.org; Thu, 06 Jun 2024 06:09:28 -0400 Original-Received: from mail-lj1-f176.google.com ([209.85.208.176]:54482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFA3i-0001jN-QQ for 71367@debbugs.gnu.org; Thu, 06 Jun 2024 06:09:27 -0400 Original-Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2ead2c6b50bso5265381fa.0 for <71367@debbugs.gnu.org>; Thu, 06 Jun 2024 03:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717668486; x=1718273286; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OPzfZYpyALzDLcKsdaVIiegP9NWbxfviGiBIzKYDsyw=; b=AHnP+Y+F4CLSAPsl2qRNqrh5VsIlbqvc8drXtGDu55Suvi/+5IPILLX1bHH8GkIfhe AtZmz9WzjQnxxh6QujeminNrb1RBm0WQe/EREOWuhi2pbd1SLaV5Fp3oncfmceD1Q7wX hdUB2M2Zvbe8zppUzZca620G2n3sjGFDzDW19iHnKGj4GQloFk+20jb+L4Otf7BJfUDL qQLYx4vo8RCkwh/Gb2xAKEfxS3R3x3Nt68RxxarYZx8LBl9zbIx35QpEIyFF9aPd7cfp DlNkNCCiPrFfNunXt8iDEAGCJKlYIyLyiqTMI8OHy1lIg2fdNJJSaanuJgjvg1r2peC7 Wvtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717668486; x=1718273286; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OPzfZYpyALzDLcKsdaVIiegP9NWbxfviGiBIzKYDsyw=; b=K3R2DqIxte8KpkBIP+Mk1Q3jJwVac9a8U+W7sSjjGx2almNdJ1+V37mH1HIpMDccN5 G3Fq13zUk3P9Bpi0/abImi63ya6ehYXT7bJqzOXIKN87qoymoIzJ3Wq5jaGAs6g/DEH3 yCVIBdJ+VFYSwaMdIUyv32/nM9hrhSKhuhy3SeyWG4gy2rURP57bUIH0JLbkncHcrQdK XEwCt5/YtdFnbTH+c37Wh3nirXrBDrBZrrcfpRzlL01giUiMNb3xz46sx6spl2YuA+ZA xkyjKiN8IVDWnI5CqwlSVdC0cycmqOkieyGr/1GytRckMU0EyWmCcoMhaln/aAoDu67g MFJQ== X-Forwarded-Encrypted: i=1; AJvYcCU9VfmwX+H8J77kRk9TNReKkuK2g1+XvpJMxVtnzdEgbCSxzBNyOCqYeGawXYs3ksrjBgwwRyB5qf8MNXuqa84VZ927YdI= X-Gm-Message-State: AOJu0Yx5yMHLW1Zgol1IAdWDP2EMOjzGPTlt105a4hDlpfJl74CXVMM1 eKVUNu7ZFgw8+Tyzf0CZKqtpf9ZmEEHdfFg1js8PFwbGT5JPNdgQvUWjiKWFe/0jWeu6iymLECu ZadvArgSk7xwzG7a6EDfChiyifMw= X-Google-Smtp-Source: AGHT+IEbCANZ+FN+uwcCAKwKaBRAhjnQIi8vOYcBa39cgMf2Zg0nawA0AeVlmKveWj5QqfuCTqA33CHWEnTM/SFyFq8= X-Received: by 2002:a05:6512:3a95:b0:523:8c7a:5f7 with SMTP id 2adb3069b0e04-52bab4c903bmr3522220e87.6.1717668485801; Thu, 06 Jun 2024 03:08:05 -0700 (PDT) In-Reply-To: <867cf2ifbp.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286680 Archived-At: > Maybe Jo=C3=A3o 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`.