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.bugs Subject: bug#59641: term is very slow Date: Fri, 16 Dec 2022 20:57:41 +0200 Message-ID: <83pmcji3bu.fsf@gnu.org> References: <878rjwmale.fsf@disroot.org> <835yf0p2ba.fsf@gnu.org> <87zgbn2oep.fsf@disroot.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28219"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59641@debbugs.gnu.org To: Akib Azmain Turja Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 16 20:14:35 2022 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 1p6GAE-00076s-I7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Dec 2022 20:14:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6FuG-0002zr-3u; Fri, 16 Dec 2022 13:58:04 -0500 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 1p6FuE-0002zR-9k for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 13:58:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6FuE-0004SV-0Q for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 13:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6FuD-0005Wt-Ju for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 13:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Dec 2022 18:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 59641-submit@debbugs.gnu.org id=B59641.167121707021249 (code B ref 59641); Fri, 16 Dec 2022 18:58:01 +0000 Original-Received: (at 59641) by debbugs.gnu.org; 16 Dec 2022 18:57:50 +0000 Original-Received: from localhost ([127.0.0.1]:50999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Fu2-0005Wf-5M for submit@debbugs.gnu.org; Fri, 16 Dec 2022 13:57:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Ftx-0005WY-KO for 59641@debbugs.gnu.org; Fri, 16 Dec 2022 13:57:48 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6Ftr-0004Oq-FA; Fri, 16 Dec 2022 13:57:39 -0500 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=/sYYxEYsbqUParym5RWbvcplvWUCetDu40KNn7vg+1o=; b=ckW8D1K82ksR BXuhxdMrqQssrae9SjiZg/xOcDFNUqqY5qd0m78fRP4ToBBPZQN1zwR7gNd5ZtO9MqALsvsLOUCYQ ad4KnfhBD2+R5knsrCyRbocPXbJTjhDYsKRynAWOEU43HIJSzop2BZ2+80aMgVpaJxsXiKLIEnjxH z7K23ldHmuaGy1sc9pjd7NsVAGtLbeGmGgghj0qc7CF0kKD/GCe8mMTp7vcwj+AjsZ/XjesaG6+6D pTjbrIxUluwJ+F4voZ531WF5JRkb/uoQC0ffrv+hdT1HxJLgddYzSztDI69+FV+I/95/tOGz0gvxA lWjrHvqK/dgn0cmocfkdIQ==; Original-Received: from [87.69.77.57] (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 1p6Ftq-0007Bl-VU; Fri, 16 Dec 2022 13:57:39 -0500 In-Reply-To: <87zgbn2oep.fsf@disroot.org> (message from Akib Azmain Turja on Sat, 17 Dec 2022 00:29:02 +0600) 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:251235 Archived-At: > From: Akib Azmain Turja > Cc: 59641@debbugs.gnu.org > Date: Sat, 17 Dec 2022 00:29:02 +0600 > > >> Here are the reports (attached), but don't seem to be human readable: > > > > Copy them from the display shown by profiler-report, after you expand it > > completely. > > > > And the "cpu" profile is enough; the "mem" one doesn't add anything useful. > > Sorry, I missed this reply. I found this in debbugs.gnu.org. :O > > Here is the data: (I didn't redo the steps, I just did > 'M-x profiler-find-profile RET path/to/profile'. ;) ) > > --8<---------------cut here---------------start------------->8--- > 9397 95% - term-emulate-terminal > 2710 27% - term-handle-ansi-escape > 1831 18% - term-down > 8 0% term-move-columns > 765 7% - term-goto Doesn't surprise me: most of the time is spent in term.el's business logic, not in Emacs display primitives. If you want to work on speeding up term.el, I suggest to start by loading term.el (not term.elc) manually, and repeating the profiling session. That could tell you in more detail where are the hot sports in those functions at the top of the profile. Then some clever optimization ideas are needed to make it significantly faster. Thanks.