nano-devel
[Top][All Lists]
Advanced

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

Re: having a scroll bar also in softwrap mode


From: Benno Schulenberg
Subject: Re: having a scroll bar also in softwrap mode
Date: Mon, 11 May 2020 19:25:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Op 09-05-2020 om 18:30 schreef Marco Diego Aurélio Mesquita:
> On Sat, May 9, 2020 at 5:41 AM Benno Schulenberg <address@hidden> wrote:
>> I don't like it that renumber_from() is burdened with
>> something that is only needed for softwrapping.  Probably the chunk
>> numbering should only be done in the softwrap case...
> 
> I think it is easy to ad  a check there but the extra computation
> seems negligible anyway.

Negligible?!  The renumbering loop consisted of: one increment, one
assignment, one stepping to the next item, and one check for NULL --
roughly eight nanoseconds.  Now it is extended with: one check, two
additions, one function call, that does another function call, that
does an 'if' and returns zero (when not softwrapping) -- roughly
twenty nanoseconds extra.  This means that the loop gets slower by
a factor of more than *three*.  That is far from negligible.

The absolute numbers don't matter much, it is the relative increase
that disgusts me.

> I didn't want to renumber before assigning these variables. I
> considered that, at least in the future, they could influence chunk
> numbering.

The future will have to worry about itself.  For now things need to
be done with the least amount of duplication of effort.

> WRT whitespace, what should I add my nanorc so that these problems go away?

Switch on brain.  Read twenty lines of code back, read twenty lines
forward, then look at your code again and see how it differs.

But if you can't think:

  extendsyntax c color black,yellow,blink,toot,beep "(if|while)\("

> Any forecast of when/if it will be committed?

Be patient.  With your impatience you are achieving the opposite
of what you want.  Also, there are bugs still in the code.  You
could have earned goodwill if you had found any of those.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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