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 20:11:49 +0100 Message-ID: <87h7vtl1u2.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> <87o8q1l40i.fsf@gmail.com> <83h7vtco49.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="42792"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: monnier@iro.umontreal.ca, 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 21:12:32 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 1jgCKu-000B28-Ky for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 21:12:32 +0200 Original-Received: from localhost ([::1]:47492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgCKt-0003SW-LJ for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 15:12:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgCKJ-0002sm-2w for emacs-devel@gnu.org; Tue, 02 Jun 2020 15:11:55 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35291) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgCKI-00020g-95; Tue, 02 Jun 2020 15:11:54 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id x14so4537636wrp.2; Tue, 02 Jun 2020 12:11:53 -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=kFw89oulAIP5/ZdQDwKm4K9o8td+afYw2DllosZgtOo=; b=band0wBRK6hIROZiPfdDbAClfJoEbzqD2GZ7eslAXgrLIt+mofhIN3McuG4JD0PO78 k4u3aAI+y9Hwzenqs7K4UquhMa4Ffs/MQta3GXmmMZiOOz7p2ltgaSMfsjG2HByq0771 cz8oXpFAoczB/mFRYnrSam9eGpclMgN9IfXtRmLfA2COgpHNtB5Eyi6o9aLrUXa8H/jr XGmNhWAyewoFOWmnlO2wFN8MGv2yBHNnYTtoUTNpUWNOg7rxYTv2jiPBTRsmejiBkvoS mroZkBSN3a0qPosbKPB8znOjEhYC3gqSDPVK9ZHBpdiLbaw9MQ45OQUdkZKZa5PtQ/rk hZkQ== 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=kFw89oulAIP5/ZdQDwKm4K9o8td+afYw2DllosZgtOo=; b=JWrzh5DnyGeIuVmwONtcairO59xLDbajLgwUgyi5tUXDZDiVxcHlsklWQExzCjKPvD 2XSVM1VK0ZKe5n/8Hv845fpwhY+3pr2dm26SkDKZ8UksDIra0zJy7h4Z/KCjKth05AAQ PY10w0zAtKM1zMjU6utLo2A5ZqllgPY4hrrF8oKOcVsqOGGvOW+7+iHwE7CK9O3dfMic r2a09ovFgQ9k6vDQDedarzX12ASC/Vb3XTGnhfAc2dhdOQzj5wJ2jfq5eaqccxShnVoH A5Jf6aSTqv1AbkukXG/godsxwPHROKVuQudoqpqNjBa+9/OfZoygPGo2H9JX4Q+vSQuP RwkA== X-Gm-Message-State: AOAM5306xXsN0AZ+fvUbpM7bXUAHvNDv3bx59tVABI1bDOOz7Ve5EWA5 O32pYWlzIXR3/g5VoLgECWY= X-Google-Smtp-Source: ABdhPJwCCoo/FWDR1le2dxhK3vQ85h7utqWYrJeEdvVgKzJWWxKTX5Aa8pqH3ns7kmp0yo1/+E5C+Q== X-Received: by 2002:a5d:4a04:: with SMTP id m4mr30207491wrq.153.1591125112430; Tue, 02 Jun 2020 12:11:52 -0700 (PDT) Original-Received: from krug (89-180-144-241.net.novis.pt. [89.180.144.241]) by smtp.gmail.com with ESMTPSA id r5sm5777183wrq.0.2020.06.02.12.11.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 12:11:51 -0700 (PDT) In-Reply-To: <83h7vtco49.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 02 Jun 2020 21:35:18 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x434.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:251779 Archived-At: Eli Zaretskii writes: > What is 'collection'? is it a function? I suppose it can be, yes. > Anyway, I suggest to run the same experiment after loading all the > code involved in this as *.el files (not *.elc). That should show a > more detailed profile, which hopefully will give a clue. That did give some clues. When loading minibuffer.el that section becomes: - complete-with-action 1125 75% - cond 1125 75% - funcall 1125 75% - all-completions 24 1% # 15 1% Which shows there's an compiled function coming from somewhere else, likely simple.el. When I load simple.el, the profile changes dramatically, and becomes so deep that it's impossivle to read because M-x profiler-report truncates the names of functions at a certain point. So then I remembered loading the compiled minibuffer.elc and loading the uncompiled simple.el, and I got more interesting results, such as these: - # 1264 82% - completion-flex-all-completions 1233 8= 0% - completion-substring--all-completions = 1212 78% - completion-pcm--all-completions 1209 = 78% - all-completions 1209 78% - # 318 = 20% - let 318 20% - complete-with-action 318 20% - all-completions 10 0% - # = 5 0% - and 5 0% funcall 4 0% - or 1 0% equal 1 0% - # 197 1= 2% - let 197 12% - complete-with-action 197 12% - all-completions 7 0% - # = 4 0% - and 4 0% funcall 4 0% - # 180 1= 1% - let 180 11% - complete-with-action 180 11% - all-completions 5 0% - # = 4 0% - and 4 0% funcall 4 0% + # 177 1= 1% + # 172 1= 1% + # 165 = 10% + completion-pcm--hilit-commonality 21= 1% Which are still kind of confusing, but at least kinda point to the time wasters being in simple.el, i.e. in the "client" code of the completions code, and _not_ in minibuffer.el, where the completion algorithm itself lives. But maybe I'm totally mistaken. Stefan is probably the best person to shed some light here. Jo=C3=A3o