From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Add user customization fido-completion-styles Date: Tue, 02 Jun 2020 19:24:45 +0100 Message-ID: <87o8q1l40i.fsf@gmail.com> References: <87r1uzn018.fsf@gmail.com> <953E1512-6420-4AE8-AF29-15AB151B6344@schwartzmeyer.com> <877dwpn2id.fsf@gmail.com> <3483a8d9-1474-45cf-afad-8d276b96ef3f@default> <87sgfdl5jw.fsf@gmail.com> <83img9cp7j.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="ciao.gmane.io:159.69.161.202"; logging-data="92902"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: drew.adams@oracle.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 02 20:25:31 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jgBbO-000O2R-9U for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 20:25:30 +0200 Original-Received: from localhost ([::1]:52874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgBbN-0006Ax-9k for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 14:25:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgBak-0005Kd-DF for emacs-devel@gnu.org; Tue, 02 Jun 2020 14:24:50 -0400 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:46029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgBaj-0000mp-Lm; Tue, 02 Jun 2020 14:24:50 -0400 Original-Received: by mail-wr1-x435.google.com with SMTP id c3so4338302wru.12; Tue, 02 Jun 2020 11:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=7Ys6OuWerAvPe5W4uokoQKsOnvdk1L7VWet7hCIwxpg=; b=kXMSUT0w7wLgr/0M7VojDgXTdbHDZHnLJutU4aDGLJZAHFzilhrWhviyC27Bhp3MLe Wbg7NnwIUUc9aKg4dr5yO0L7o1NeauvK7riOlXwkdMfgpBGopvEi8NXsOkfxXByxittB eLh9yKlreO1t1+Ax3KjJVOBWcG454YIS6NqrmsoqccktDuNlzTBs18/F7xrvdLd5ddcw NpTMg+IhgIUIid5TSlo01tOqDj4sbp+Zmoz4y3nmlB4yUHckvq4zF4L8tjwWm+aACAhJ B6v8KGRnDjGyS6zjqJLfFL7D67C17lSLOWIZkXAZPq5dIsYDD+DeY5UZg5HsmXVfM3k5 ObMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=7Ys6OuWerAvPe5W4uokoQKsOnvdk1L7VWet7hCIwxpg=; b=oCfa7/Li/YSvdhAmxEuhYgJ0DXovG7XRprlkqPgDhuQPqu1KSkjDhBlDGBZSqN19/7 TgxkSRNltxaw0Mv3Cb+Q54OZfwzmNUNGEqhhu0m0SfhqFuy/eXrJC2Qss6tsw9YU2hTW 3VY2Yx/uqnAeQl/TfrSWlZtOebjRXCLL5TyE+eitxSnoKSbQg0E6H2DcIKeHzuPrAbGM XxBwr+W+dJ/ocorWNbNxfZUbjFubc3fyRWTAmEc7OzjGYfQpG8GAaG4I75FMPSgI2jg2 EcVMS6PIMSgQThI8FyVn7i+ITKjMO8JomqrcbP570W71ioQnXLJP2ptSEFR4a5QBGPQk 7hvw== X-Gm-Message-State: AOAM531fRRTaKI/8Ye4UXhyigmW4mTdATPeEAyO9ty/jI2pnRcqI2wIu EUlBiRuXiuKD2Xp9jdth/VjmYapmXsY= X-Google-Smtp-Source: ABdhPJyPmKo8x7n1BTs/uZbPHUSaijogFQACQSheM2Lieu3agd76q3i8uIHO3vE+K7KxZoJtNXYxug== X-Received: by 2002:adf:ef47:: with SMTP id c7mr29646087wrp.57.1591122287618; Tue, 02 Jun 2020 11:24:47 -0700 (PDT) Original-Received: from krug ([89.180.144.241]) by smtp.gmail.com with ESMTPSA id s72sm788346wme.35.2020.06.02.11.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 11:24:46 -0700 (PDT) In-Reply-To: <83img9cp7j.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 02 Jun 2020 21:11:44 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251776 Archived-At: Eli Zaretskii writes: >> From: Jo=C3=A3o T=C3=A1vora >> Date: Tue, 02 Jun 2020 18:51:31 +0100 >> Cc: emacs-devel@gnu.org >>=20 >> - icomplete-post-command-hook 2032 8= 6% >> - icomplete-exhibit 2032 8= 6% >> - icomplete-completions 2009 8= 5% >> - icomplete--sorted-completions 1986 8= 4% >> - completion-all-sorted-completions 1986 8= 4% >> - completion-all-completions 1982 8= 4% >> - completion--nth-completion 1982 8= 4% >> - completion--some 1982 8= 4% >> - # 1982 8= 4% >> - completion-flex-all-completions 1965 8= 4% >> - completion-substring--all-completions 1935 8= 2% >> - completion-pcm--all-completions 1932 8= 2% >> - all-completions 1929 8= 2% >> - # 1929 8= 2% >> - complete-with-action 1929 8= 2% >> - all-completions 37 = 1% > > This actually says that the time sink is complete-with-action, not > all-completions. > >> As you know, all-completions is a C function. The 1% is suspicious, I >> don't know if I should trust it. > > You should trust the profile. It works the same whether it's a C > function or a Lisp function. OK that's good to know, but then, I don't know where the time is going: Shouldn't I be seeing some callee of this function using up the time?? This is complete-with-action minus docstring, can you help me understand what's going on? (defun complete-with-action (action collection string predicate) (cond ((functionp collection) (funcall collection string predicate action)) ((eq (car-safe action) 'boundaries) nil) ((eq action 'metadata) nil) (t (funcall (cond ((null action) 'try-completion) ((eq action t) 'all-completions) (t 'test-completion)) string collection predicate)))) Jo=C3=A3o