[Lazarus] Line Ending FPC/Delphi

Lee Jenkins lee at datatrakpos.com
Thu Mar 5 15:34:37 CET 2009


Martin Friebe wrote:
> Flávio Etrusco wrote:
>   
>> On Wed, Mar 4, 2009 at 11:27 AM, Martin Friebe <lazarus at mfriebe.de> wrote:  
>>     
>>> This would mean the only Problem remaining is:
>>> If a user writes his own code, calling Lines.Add (or even Lines.Insert)
>>> in a loop. And does so without calling Lines.BeginUpdate before.
>>>
>>> While I admit that such a behaviour would add a lot of calculation
>>> overhead, with the current SynEdit implementation, I would also see it
>>> partly as a user error, since other Components also provide BeginUpdate
>>> or similar Methods.
>>> Still it should be fixed.   
>>>       
>> Calling BeginUpdate is not enough, they must disable/unset the
>> highlighter to avoid the double parse.
>>     
> As I said, I need to check, if BeginUpdate currently works(I haven't 
> verified, so I don't know if it does). Until that is done the bug stays 
> as it is.
>
> *If* BeginUpdate works, then the content of my original mail should be 
> applicable.
>
>   

To avoid any misunderstanding:

*If* / *Once* BeginUpdate works, then you can insert a batch of say 100 
lines (with Lines.Add or Lines.Insert). It will scan 101 lines (because 
yes, 1 line needs to be rescanned)
I do not think we need to worry about the performance between 100 or 101 
Lines? (Not saying this may not be "fixed", but it would have a very low 
priority "post 1.2")

If you insert a single line, it will scan 2 Lines. True that is not good 
neither. But it will still be so fast that no human can tell the difference.

So I will fix BeginUpdate, *if* it is broken (and I will try to get that 
done for 0.9.28)

But making the changes according to the original description will be 
deferred for later (unless a nice clean patch comes along).
It may also be that it will become unnecessary due to other changes that 
may be made in future.


Do you think fixing BeginUpdate will improve the Situation enough for now?

Best Regards
Martin








More information about the Lazarus mailing list