From:  Boris Zbarsky <>
Date:  13 Dec 2005 00:08:27 Hong Kong Time

Re: Layout performanance on large text files.


Jon Smirl wrote:
> I suspect the loop is caused by trying to measure the length

Don't suspect.  Profile.  If you can attach the file in question, I can probably 
profile it when I get back in about 3 weeks (if you haven't done it yourself by 

> in order to compute the width of the display. 

Unlikely that this is the primary purpose.  More likely, the "problem" is that 
plain text s just treated like HTML with a single 
 block and the layout is 
done via CSS, and with CSS you MUST lay out the whole document at once 
(something I'm sure vi does not ever do).

> Even if the width can't be lazy evaluated, it would be nice to do
> layout on a lower priority thread that would leave the UI responsive
> to requests to abort the layout.

Layout and the UI are on the same thread.