[Top][All Lists]

[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: Sat, 07 Feb 2015 15:07:48 +1100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

I've now reworked the table layout algorithm to behave more nicely when
dealing with nested tables.

As a test case, I'm using the "cat" Wikipedia genealogy table, which has
tables in tables galore, and lots of little text snippets to try to
fold.  Here's the relevant data:

shr-insert-document                  1           5.11859327    5.11859327
shr-pixel-buffer-width               1940        1.8345742170  0.0009456568
shr-fold-lines                       1579        1.7859513240  0.0011310648
shr-vertical-motion                  2625        1.7517520130  0.0006673341

`shr-pixel-buffer-width' and `shr-vertical-motion' are just wrappers
over `window-text-pixel-size' and `vertical-motion' respectively (for
easier profiling).

So out of the five seconds it takes to render the page now (which is, of
course, way too slow to be usable), (+ 1.8 1.7) => 3.5s is spent moving
to pixels and computing pixel widths.

There may still be algorithmic fixes that can be done to get the number
of calls down, but having the primitives be faster (i.e., the glyph
width vector thing) may also help a lot...

(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]