From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Pixel-based display functions Date: Tue, 10 Feb 2015 17:07:33 +1100 Message-ID: <87k2zqwb8a.fsf@building.gnus.org> References: <838ughilmo.fsf@gnu.org> <54CE6BD2.8000402@gmx.at> <8361bliin0.fsf@gnu.org> <83386piiby.fsf@gnu.org> <87oap9yoti.fsf@building.gnus.org> <874mqzvnwo.fsf@building.gnus.org> <83h9uzeb4a.fsf@gnu.org> <87bnl7jrr7.fsf@building.gnus.org> <831tm3dt8u.fsf@gnu.org> <87k2zvgj4d.fsf@building.gnus.org> <83siejcahb.fsf@gnu.org> <83sieiar6i.fsf@gnu.org> <83oap5c480.fsf@gnu.org> <87d25lc3xu.fsf@building.gnus.org> <877fvtc2qj.fsf@building.gnus.org> <83wq3s9rmr.fsf@gnu.org> <878ug72064.fsf@building.gnus.org> <838ug79h3x.fsf@gnu.org> <87egpytlrk.fsf@building.gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423548651 23649 80.91.229.3 (10 Feb 2015 06:10:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2015 06:10:51 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 10 07:10:50 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YL424-0002wk-5v for ged-emacs-devel@m.gmane.org; Tue, 10 Feb 2015 07:10:48 +0100 Original-Received: from localhost ([::1]:37650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL423-0000tt-KY for ged-emacs-devel@m.gmane.org; Tue, 10 Feb 2015 01:10:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL41b-0000tb-T2 for emacs-devel@gnu.org; Tue, 10 Feb 2015 01:10:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YL41Y-00005I-2W for emacs-devel@gnu.org; Tue, 10 Feb 2015 01:10:19 -0500 Original-Received: from smtp.syd.comcen.com.au ([203.23.236.77]:4560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL41T-0008Ut-Fr; Tue, 10 Feb 2015 01:10:11 -0500 Original-Received: from building.gnus.org ([27.96.197.126]) by smtp.syd.comcen.com.au (8.13.4/8.12.9) with ESMTP id t1A67c0M041499; Tue, 10 Feb 2015 17:07:39 +1100 (EST) In-Reply-To: <87egpytlrk.fsf@building.gnus.org> (Lars Ingebrigtsen's message of "Tue, 10 Feb 2015 15:48:15 +1100") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-comcen-MailScanner-Information: Please contact the ISP for more information X-comcen-MailScanner: Found to be clean X-comcen-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0.122, required 4, AWL 0.02, BAYES_50 0.00, RDNS_NONE 0.10) X-comcen-MailScanner-From: larsi@gnus.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 203.23.236.77 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182779 Archived-At: Lars Ingebrigtsen writes: > I'll apply the shr branch stuff to the trunk later today and post some > new ELP traces with the new `vertical-motion' speedups. Here's the output when not giving the col number to `vertical-motion', and starting from the second character on the line: shr-insert-document 1 2.545489884 2.545489884 shr-pixel-buffer-width 1018 0.7405463030 0.0007274521 shr-vertical-motion 1993 0.2620109859 0.0001314656 Here's when giving a 0 argument, and starting from `beginning-of-line': shr-insert-document 1 4.449059093 4.449059093 shr-vertical-motion 1993 2.1624376150 0.0010850163 shr-pixel-buffer-width 1018 0.7389822159 0.0007259157 So this is apparently 10x slower now? Uhm... Could there be an issue with the new code being slower when the buffer in question isn't being displayed? These are the two versions of the function being used, with the first one being 10x slower than the second. (defun shr-vertical-motion (column) (if (not shr-use-fonts) (move-to-column column) (beginning-of-line) (vertical-motion (cons (/ column (frame-char-width)) 0) nil 0) (unless (eolp) (forward-char 1)))) (defun shr-vertical-motion (column) (if (not shr-use-fonts) (move-to-column column) (beginning-of-line) (unless (eolp) (forward-char 1)) (vertical-motion (cons (/ column (frame-char-width)) 0)) (unless (eolp) (forward-char 1)))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/