From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Too long completion delay time in LISP interaction mode. Date: Wed, 20 Oct 2021 07:01:24 +0200 Message-ID: <87tuhcs2ov.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35912"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.0; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 20 07:09:41 2021 Return-path: Envelope-to: geh-help-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 1md3rA-0009D5-QT for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 20 Oct 2021 07:09:40 +0200 Original-Received: from localhost ([::1]:58030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1md3r9-0004y5-0m for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 20 Oct 2021 01:09:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1md3qO-0004wQ-Oz for help-gnu-emacs@gnu.org; Wed, 20 Oct 2021 01:08:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52838) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1md3qO-0007s9-GH; Wed, 20 Oct 2021 01:08:52 -0400 Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:42885) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1md3qO-0000Q6-Cy; Wed, 20 Oct 2021 01:08:52 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id D779527C005C; Wed, 20 Oct 2021 01:08:51 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 20 Oct 2021 01:08:51 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvfedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve evieekteekveeigfefffeivdetgeduvdffueeuudevgedttdehvdfhueevfffhnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Oct 2021 01:08:50 -0400 (EDT) In-reply-to: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133900 Archived-At: Hongyi Zhao writes: > On Ubuntu 20.04.3 LTS, I'm using the self compiled Emacs git master > version. I find there is a very long completion delay time in LISP > interaction mode. For example, when I type `(map)' in scratch buffer, > there will have 5070 candidates as shown in the attached file, and the > completion delay is about 2-5 seconds. > > Any hints to improve this phenomenon? First, I'd try to isolate where the slowdown happens. The screenshots suggests you are using company-mode with custom hacks to get the numbering of candidates and you are using some fuzzy completion-style. So I'd start with emacs -Q and typing (map in *scratch* to get the *Completions* buffer. That will probably be fast but deliver less results because of the default value of `completion-styles'. Then I'd try out your settings of `completion-styles' (and `completion-category-overrides' if you have customized that). Then again with `company-mode' but first without the numbering hack, and eventually with it. At which step does it become slow? Also, using the profiler might shed some light on where the time is spent, see (info "(elisp) Profiling"). HTH, Tassilo