From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Entering emojis Date: Fri, 29 Oct 2021 19:01:21 +0300 Message-ID: <83a6irrfam.fsf@gnu.org> References: <87cznths5j.fsf@gnus.org> <87ilxi7531.fsf@gnus.org> <875yth7bjr.fsf@gnus.org> <871r4576ey.fsf@gnus.org> <87wnlx5rd4.fsf@gnus.org> <837ddxtimp.fsf@gnu.org> <87h7d15mvi.fsf@gnus.org> <831r45tgu3.fsf@gnu.org> <87cznp5k6p.fsf@gnus.org> <83tuh1rvjt.fsf@gnu.org> <87czno3jmp.fsf@gnus.org> <83bl38s7t5.fsf@gnu.org> <871r440zj1.fsf@gnus.org> <83mtmsq7q1.fsf@gnu.org> <87r1c4x86a.fsf@gnus.org> <83ilxgq6k3.fsf@gnu.org> <87ilxfyl6w.fsf@gnus.org> <87a6irykbn.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22075"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 29 18:06:34 2021 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 1mgUOm-0005Sj-Dq for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Oct 2021 18:06:32 +0200 Original-Received: from localhost ([::1]:43120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgUOk-00022g-9L for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Oct 2021 12:06:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgUK0-00066I-Uk for emacs-devel@gnu.org; Fri, 29 Oct 2021 12:01:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgUK0-0003Dl-KX; Fri, 29 Oct 2021 12:01:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dOWVzWaf+l+dwcz4g81itm/Nv0N5KyuHUpC4Es1Tvm0=; b=XWXlq1+vEkeG VFwbMfeu8w2PJLkCz7JR0KXJpDMieQIzWhj4nAIm99VyD1ycDDdENLWB5uCSAuhy7rcvxB+qGrnrZ VtEbLOWJBasFZ0fX264ffstPMMNJnWS8POB8AXMNGkzLK9dK+vXSMUwNvTQ/CNFT0uGCNirowI+xT 1KcVylGIhNbOJtUQN9vgqNoa3Z3/M2KpaFXyI4NYc5sM61oVDF2v2XIyASEomPoaOGfVmlQ3ckOO3 Nr8eQnfHEQRGndx+8HoNj0jkVSBqS3toC1MXB+W6FKN13qGNuG7DLRChwtab3H4Mgd5ZK2QeRvQNE IHtpHywMx1Bloi18mky1+Q==; Original-Received: from [87.69.77.57] (port=4133 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgUK0-00037z-4c; Fri, 29 Oct 2021 12:01:36 -0400 In-Reply-To: <87a6irykbn.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 29 Oct 2021 16:30:52 +0200) 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:278203 Archived-At: > From: Lars Ingebrigtsen > Cc: stefankangas@gmail.com, emacs-devel@gnu.org > Date: Fri, 29 Oct 2021 16:30:52 +0200 > > Lars Ingebrigtsen writes: > > > (char-displayable-p char))) > > The thing that takes time is way down in > > fontset_find_font (Lisp_Object fontset, int c, struct face *face, > > This bit: > > /* Find a font best-matching with the spec without checking > the support of the character C. That checking is costly, > and even without the checking, the found font supports C > in high possibility. */ > font_entity = font_find_for_lface (f, face->lface, > FONT_DEF_SPEC (font_def), -1); > if (NILP (font_entity)) > { > /* Record that no font matches the spec. */ > RFONT_DEF_SET_FACE (rfont_def, -1); > continue; > } > > So might it be an idea to introduce a variable that could be bound to > avoid this part? I'd prefer not to do it on such a low level. I'd still would like to see a profile. Here's the recipe: emacs -Q M-x load-file RET lisp/play/emoji.el RET M-x profiler-start RET RET Then run the command you say is slow. When it finishes, do this: M-x profiler-report RET Then go to the first line in the profile that shows "+" at its beginning and type "C-u RET". This should expand the profile in its entirety; post the result here. Note that I specifically asked to load emoji.el, not .elc, because that will make the profile more detailed. Thanks.