[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pixel-based display functions
From: |
Lars Ingebrigtsen |
Subject: |
Re: Pixel-based display functions |
Date: |
Tue, 10 Feb 2015 17:07:33 +1100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Lars Ingebrigtsen <address@hidden> 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/
- Re: Pixel-based display functions, (continued)
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/07
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/07
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/07
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/07
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/07
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/07
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/08
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/08
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/09
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/09
- Re: Pixel-based display functions,
Lars Ingebrigtsen <=
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/10
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/10
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/10
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/11
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/10
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/11
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/11
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/02/17
- Re: Pixel-based display functions, Eli Zaretskii, 2015/02/17
- Re: Pixel-based display functions, Stefan Monnier, 2015/02/18