nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Port of variable-length chunks to 2.8.2


From: David Ramsey
Subject: Re: [Nano-devel] Port of variable-length chunks to 2.8.2
Date: Fri, 5 May 2017 16:20:20 -0500

On Fri, May 5, 2017 at 2:33 PM, Benno Schulenberg
<address@hidden> wrote:
> I will look at the patch set next week.

Thank you.  Although the recent git changes break it a bit; I can send
an updated version if need be.  Note that the wrapper functions in it
are still named get_chunk(), get_chunk_leftedge(), etc., which I know
you don't like, but I can't think of better names at the moment, so if
you have any suggestions for them, let me know.

> But first something that has bothered me for at least two months.
> Whenever update_line() is called in softwrap mode, the subsequent call
> to update_softwrapped_line() figures out /every time/ on which row to
> start drawing this line, involving a strlenpt() call on each visible
> preceding line.

Good point.  I'll look into it soon.

On a similar note, this patch set slows things down further, because
scanning the line to figure out where to break it takes longer.  Also,
since get_softwrap_breakpoint() works on columns instead of indexes,
scanning from a chunk after the first one involves starting from the
beginning of the line and parsing it from there to the starting column
of that chunk.  This is also wasteful, but given the discrepancy between
columns and indexes, I can't think of a better way that doesn't involve
caching information about every line, which would be more efficient but
much more complicated to implement.  And returning an index wouldn't
improve things, because the same parsing would have to be done in order
to convert it back into a column.

But this kind of stuff is what reviews are supposed to deal with, right?
:)



reply via email to

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