Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-07 Thread Graeme Geldenhuys via Lazarus
On 2016-11-07 06:39, Martin Schreiber via Lazarus wrote: > Marketing is the most important task It was for the interest of education of course. ;-) Regards, Graeme -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-06 Thread Martin Schreiber via Lazarus
On Monday 07 November 2016 00:39:51 Graeme Geldenhuys via Lazarus wrote: > On 2016-11-06 15:45, zeljko via Lazarus wrote: > > No, I don't know any widgetset which supports different font color/style > > for texthint. > > fpGUI does - for some years now. ;-) I also implemented a specific > colour

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-06 Thread Ondrej Pokorny via Lazarus
On 04.11.2016 16:18, zeljko wrote: On 11/04/2016 03:32 PM, Ondrej Pokorny via Lazarus wrote: On 04.11.2016 13:16, Luiz Americo Pereira Camara via Lazarus wrote: In the last trunk, the slow issue is fixed regardless of usage of TextHint in TMemo or not. Fixed also not being reset after text

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-04 Thread zeljko via Lazarus
On 11/04/2016 02:28 PM, Bart via Lazarus wrote: On 11/4/16, Ondrej Pokorny via Lazarus wrote: The TextHint implementation should be completely rewritten. It shouldn't use the text property but paint the TextHint onto the control by itself. Windows can do that

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-04 Thread Ondrej Pokorny via Lazarus
On 04.11.2016 13:16, Luiz Americo Pereira Camara via Lazarus wrote: In the last trunk, the slow issue is fixed regardless of usage of TextHint in TMemo or not. Fixed also not being reset after text changed / added I see that r53292, r53293 and r53296 are all about TextHint - all this code

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-04 Thread Luiz Americo Pereira Camara via Lazarus
In the last trunk, the slow issue is fixed regardless of usage of TextHint in TMemo or not. Fixed also not being reset after text changed / added Due to the way CharCase is implemented, the slow will manifest if this property is set to a value different from the default one Some notes: - It

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-04 Thread Ondrej Pokorny via Lazarus
On 04.11.2016 10:38, Michael W. Vogel via Lazarus wrote: Thats also fine. So it can be implemented for TComboBox (as in Delphi) too. Yes, exactly. So for now, the speed and paint issue should be fixed, later the redesign. If the issue is a direct cause of introducing the TextHint property

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-04 Thread Graeme Geldenhuys via Lazarus
On 2016-11-04 07:35, Ondrej Pokorny via Lazarus wrote: > The TextHint implementation should be completely rewritten. It shouldn't > use the text property but paint the TextHint onto the control by itself. Very true, and using the Tex property for that is indeed a very bad idea/design. fpGUI's

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-04 Thread Gabor Boros via Lazarus
2016. 11. 04. 8:35 keltezéssel, Ondrej Pokorny via Lazarus írta: The TextHint implementation should be completely rewritten. It shouldn't use the text property but paint the TextHint onto the control by itself. It's good to hear! The new implementation will be included in 1.8? Gabor --

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-04 Thread Ondrej Pokorny via Lazarus
On 03.11.2016 22:46, Michael W. Vogel via Lazarus wrote: 1. TextHint in Delphi is theme dependent and OS dependent (available for Windows Vista, Windows 7, or later), in Lazarus not. What is the desired behaviour? TextHint in Lazarus should be OS independent (it was decided long time ago).

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-03 Thread Michael W. Vogel via Lazarus
Hi, After looking a bit at this issue http://bugs.freepascal.org/view.php?id=30851, I have some general questions. Is the behaviour of Delphi more important or a user friendly one? 1. TextHint in Delphi is theme dependent and OS dependent (available for Windows Vista, Windows 7, or later), in

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-03 Thread Michael W. Vogel via Lazarus
Am 03.11.2016 um 00:27 schrieb Luiz Americo Pereira Camara via Lazarus: Can you try with TextHint <> ''? Seems that will need to add an aditional check for lines UpdateCount Thank you for the hints! I add a new patch (just for Windows now), it takes care about this issues. There is one nasty

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Graeme Geldenhuys via Lazarus
On 2016-11-02 22:24, Michael W. Vogel via Lazarus wrote: > I have made a bug entry and added there a first patch (its not the final > one, but its late here now) I didn't look at what exactly the patch does, but on first testing it reduced the running time from 9000+ milliseconds to 250ms. So

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Michael W. Vogel via Lazarus
I have made a bug entry and added there a first patch (its not the final one, but its late here now). Can you check, if it fixes the speed on your OS too (I have tested only Windows 7 for now)? http://bugs.freepascal.org/view.php?id=30851 Thank you for your feedback! Kind regards Michl Am

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Graeme Geldenhuys via Lazarus
On 2016-11-02 18:43, Luca Olivetti via Lazarus wrote: > Maybe it's overkill, but it's necessary under windows, Welcome to the benefits of custom components where you can easily outperform native components. Just curious, has anybody tried the TMemo of LCL-CustomDrawn widgetset? I know the

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Luca Olivetti via Lazarus
El 02/11/16 a les 14:47, Graeme Geldenhuys via Lazarus ha escrit: On 2016-11-02 13:36, Luca Olivetti via Lazarus wrote: Try using a TSynEdit instead of a TMemo. That's a bit of overkill in most cases, plus - as Bernd clearly point out - there is a TMemo regression bug in LCL. Maybe it's

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Werner Pamler via Lazarus
I tested on Win 10 (using the code of the first post in this thread): - 23 sec on Laz trunk / fpc 3.0 - 23 sec on Laz 1.6 / fpc 3.0 - 23 sec Laz trunk / fpc 2.6.4 - 2.2 sec on Laz 1.44 / fpc 2.6.4 - 1.4 sec on Delphi Berlin 10.1 Using Lazarus trunk I could get a good boost by adding the strings

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Graeme Geldenhuys via Lazarus
On 2016-11-02 13:36, Luca Olivetti via Lazarus wrote: > Try using a TSynEdit instead of a TMemo. That's a bit of overkill in most cases, plus - as Bernd clearly point out - there is a TMemo regression bug in LCL. Regards, Graeme -- ___ Lazarus

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Bernd Mueller via Lazarus
On 11/02/2016 02:36 PM, Luca Olivetti via Lazarus wrote: Try using a TSynEdit instead of a TMemo. I did not try with lazarus 1.6, but with 1.4.4 it is 9ms vs 143 ms for a tmemo. On windows tmemo is even slower, while TSynEdit isn't. Thank you for your suggestion. With Lazarus 1.6, TSynEdit

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Luca Olivetti via Lazarus
El 02/11/16 a les 13:27, Bernd Mueller via Lazarus ha escrit: Hello, with Lazarus 1.6 (FPC 3.0.0 i386-linux-gtk 2) filling a Memo with 1 lines takes about 18 seconds on my system. Doing the same with Lazarus 1.4.0 (FPC 2.6.4 i386-linux-gtk 2) takes about 193 ms. I cannot believe, that

Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Graeme Geldenhuys via Lazarus
On 2016-11-02 12:27, Bernd Mueller via Lazarus wrote: > with Lazarus 1.6 (FPC 3.0.0 i386-linux-gtk 2) filling a Memo with 1 > lines takes about 18 seconds on my system. I can confirm that. Using 64-bit Lazarus (trunk from a week ago) with FPC 3.0.0 and LCL-GTK2. On my Intel i7-3550K CPU @

[Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-02 Thread Bernd Mueller via Lazarus
Hello, with Lazarus 1.6 (FPC 3.0.0 i386-linux-gtk 2) filling a Memo with 1 lines takes about 18 seconds on my system. Doing the same with Lazarus 1.4.0 (FPC 2.6.4 i386-linux-gtk 2) takes about 193 ms. I cannot believe, that Lazarus 1.6 should be nearly 90 times slower than 1.4.0. I am