From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.bugs Subject: bug#19776: 25.0.50; HTML rendering is very slow Date: Thu, 05 Feb 2015 12:42:21 +0100 Message-ID: <87wq3wk2jm.fsf@yahoo.fr> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423136596 18013 80.91.229.3 (5 Feb 2015 11:43:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2015 11:43:16 +0000 (UTC) Cc: 19776@debbugs.gnu.org To: Richard Stallman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 05 12:43:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YJKq0-0003dX-1o for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Feb 2015 12:43:12 +0100 Original-Received: from localhost ([::1]:41352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJKpz-0003nm-3c for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Feb 2015 06:43:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJKpu-0003mp-Mh for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2015 06:43:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJKpq-0006aE-FH for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2015 06:43:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJKpq-0006Zj-Cx for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2015 06:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YJKpq-0002ll-0U for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2015 06:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Richard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Feb 2015 11:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19776 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19776-submit@debbugs.gnu.org id=B19776.142313654410592 (code B ref 19776); Thu, 05 Feb 2015 11:43:01 +0000 Original-Received: (at 19776) by debbugs.gnu.org; 5 Feb 2015 11:42:24 +0000 Original-Received: from localhost ([127.0.0.1]:34575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YJKpD-0002km-Jk for submit@debbugs.gnu.org; Thu, 05 Feb 2015 06:42:24 -0500 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:51644) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YJKpA-0002kb-UP for 19776@debbugs.gnu.org; Thu, 05 Feb 2015 06:42:21 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgFANNW01SkD4Xx/2dsb2JhbABahDGCMq1NAQEBAQEBBpgyAoFoAQEBAQF9hA0BBAEnUgULCAMOEyUPAQRJE4gYAQwIwSeOJQGGLQEBAQEBAQEDAQEBAQEBHIYEgiqHSgeEKQWYPoYwjDoig289MYJCAQEB Original-Received: from mathsrv4.ulb.ac.be (HELO localhost) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 05 Feb 2015 12:41:59 +0100 In-Reply-To: (Richard Stallman's message of "Wed, 04 Feb 2015 18:03:17 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99057 Archived-At: Richard Stallman writes: > The automatic HTML rendering of the following message takes several > seconds on this X60 which for most things is blindingly fast. FWIW, here's the elp-results on my machine (after instrumenting the package shr, and calling shr-render-buffer) : shr-descend 6227 408.78522387 0.0656472175 shr-tag-table 1062 189.46034310 0.1783995697 shr-tag-table-1 1062 189.33667913 0.1782831253 shr-make-table 3186 187.52006959 0.0588575234 shr-make-table-1 1070 164.06574762 0.1533324744 shr-render-td 3428 163.98280975 0.0478362922 shr-render-buffer 1 28.734523319 28.734523319 shr-insert-document 1 28.712268988 28.712268988 shr-tag-body 1 28.690722764 28.690722764 shr-insert-table 1062 0.8013559019 0.0007545724 shr-insert 4126 0.283103186 6.861...e-05 shr-tag-a 822 0.2324357269 0.0002827685 shr-column-specs 1062 0.1266108010 0.0001192192 shr-tag-div 198 0.0957929849 0.0004838029 shr-max-columns 2124 0.0947569080 4.461...e-05 shr-colorize-region 634 0.075634319 0.0001192970 shr-parse-style 548 0.0700457249 0.0001278206 shr-color-check 141 0.0599092470 0.0004248882 shr-tag-img 333 0.058440363 0.0001754965 shr-color-visible 141 0.0464957430 0.0003297570 shr-urlify 212 0.0396780100 0.0001871604 shr-count 5966 0.0346115289 5.801...e-06 shr-table-widths 1062 0.0337347569 3.176...e-05 shr-add-font 3462 0.0260796149 7.533...e-06 shr-find-fill-point 494 0.0245121429 4.961...e-05 shr-indent 10019 0.0231243120 2.308...e-06 shr-remove-trailing-whitespace 1 0.02058152 0.02058152 shr-pro-rate-columns 1062 0.0123682060 1.164...e-05 shr-insert-table-ruler 4045 0.0103226100 2.551...e-06 shr-ensure-paragraph 1064 0.0096426120 9.062...e-06 shr-color->hexadecimal 282 0.0084433179 2.994...e-05 shr-fold-text 23 0.0077441709 0.0003367030 shr-ensure-newline 396 0.0067178849 1.696...e-05 shr-expand-url 545 0.0023009930 4.222...e-06 shr-tag-br 102 0.002192799 2.149...e-05 shr-tag-comment 289 0.0007590249 2.626...e-06 shr-tag-title 1 0.00071629 0.00071629 shr-heading 1 0.000702604 0.000702604 shr-encode-url 46 0.0006519919 1.417...e-05 shr-fontize-dom 1 0.000606771 0.000606771 shr-tag-span 9 0.000584241 6.491...e-05 shr-previous-newline-padding-width 126 0.0004090820 3.246...e-06 shr-image-displayer 23 8.367...e-05 3.638...e-06 shr-tag-style 1 2.438e-06 2.438e-06 > Since there is no indication on the screen of what is happening, > I think that I failed to type a command, and type it again. > > It needs to be sped up, but in the short term it needs to display > "Rendering html..." in the echo area. A patch is attached but I don't know if this is the right place for it (shr-insert-document). modified lisp/net/shr.el @@ -208,7 +208,8 @@ (defun shr-insert-document (dom) (shr-depth 0) (shr-warning nil) (shr-internal-width (or shr-width (1- (window-width))))) - (shr-descend dom) + (with-temp-message "Rendering HTML..." + (shr-descend dom)) (shr-remove-trailing-whitespace start (point)) (when shr-warning (message "%s" shr-warning)))) -- Nicolas