Re: [PATCH] make string breaking faster

2016-07-20 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > Le 07/07/2016 ? 23:58, Jean-Marc Lasgouttes a écrit : >> So, what is the secret patch, I hear you ask? Here it is for your >> enjoyment. The idea is to keep around the glyph representation of our >> row elements and to use them even for drawing. It is not quite ready,

Re: [PATCH] make string breaking faster

2016-07-19 Thread Jean-Marc Lasgouttes
Le 07/07/2016 à 23:58, Jean-Marc Lasgouttes a écrit : So, what is the secret patch, I hear you ask? Here it is for your enjoyment. The idea is to keep around the glyph representation of our row elements and to use them even for drawing. It is not quite ready, but as you see, it works. In a first

Re: [PATCH] make string breaking faster

2016-07-18 Thread Jean-Marc Lasgouttes
Le 07/07/2016 à 23:58, Jean-Marc Lasgouttes a écrit : So, what is the secret patch, I hear you ask? Here it is for your enjoyment. The idea is to keep around the glyph representation of our row elements and to use them even for drawing. It is not quite ready, but as you see, it works. In a first

Re: [PATCH] make string breaking faster

2016-07-18 Thread Guillaume Munch
Le 17/07/2016 18:31, Jean-Marc Lasgouttes a écrit : Guillaume, I'd like to have your input wrt this patch and Qt 5.x. I would prefer for cleanness to avoid double caching in this case and keep the patch Qt4 only. Makes sense.

Re: [PATCH] make string breaking faster

2016-07-17 Thread Jean-Marc Lasgouttes
Le 07/07/2016 23:58, Jean-Marc Lasgouttes a écrit : Two conclusions: * the secret patch is fast * Qt5.5 is fast even without it (better tests have to be done with Qt5), and not really faster with it. For memory sake, the caching patch should maybe by Qt4 only. So, what is the secret patch,

Re: [PATCH] make string breaking faster

2016-07-08 Thread Jean-Marc Lasgouttes
Le 08/07/2016 18:29, Pavel Sanda a écrit : 2.3.0dev+Qt4 with caching: 10 seconds I would like to reproduce this line. It is current master on some patch on top of it? Current master + secret patch. I gave you antidote already ;) Seing your reaction it strikes me that the whole thing might h

Re: [PATCH] make string breaking faster

2016-07-08 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: >> Can you try once more, now with only left-right cursor? >> The secret patch does not seem to help with this issue. > > OK, here you are (full screen, zoom 120%, UserGuide from 2.1.5, the bottom > contains the first line of the "how LyX looks" section): > > 2.1.5: 8 s

Re: [PATCH] make string breaking faster

2016-07-08 Thread Jean-Marc Lasgouttes
Le 08/07/2016 00:42, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: the User Guide, because the right arrow really requires too much time for some reason. [Rereading your message I notice only now that you meant first page only. Oh well.] Can you try once more, now with only left-right curs

Re: [PATCH] make string breaking faster

2016-07-07 Thread Jean-Marc Lasgouttes
I will. JMarc Le 8 juillet 2016 00:42:47 GMT+02:00, Pavel Sanda a écrit : >Jean-Marc Lasgouttes wrote: >> the User Guide, because the right arrow really requires too much time >for >> some reason. [Rereading your message I notice only now that you meant >first >> page only. Oh well.] > >Can y

Re: [PATCH] make string breaking faster

2016-07-07 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > the User Guide, because the right arrow really requires too much time for > some reason. [Rereading your message I notice only now that you meant first > page only. Oh well.] Can you try once more, now with only left-right cursor? The secret patch does not seem to h

Re: [PATCH] make string breaking faster

2016-07-07 Thread Jean-Marc Lasgouttes
Le 07/07/2016 23:58, Jean-Marc Lasgouttes a écrit : Le 07/07/2016 19:06, Pavel Sanda a écrit : Can you try if you can see difference between 2.1 and master for this scenario: 1. set high speed rate for your keyboard: xset r rate 300 180 2. load user guide, fullscreen 3. Hold right arrow until yo

Re: [PATCH] make string breaking faster

2016-07-07 Thread Richard Heck
On 07/07/2016 04:24 PM, Pavel Sanda wrote: Richard Heck wrote: Can you try if you can see difference between 2.1 and master for this scenario: 1. set high speed rate for your keyboard: xset r rate 300 180 2. load user guide, fullscreen 3. Hold right arrow until you reach the end of the first pag

Re: [PATCH] make string breaking faster

2016-07-07 Thread Jean-Marc Lasgouttes
Le 07/07/2016 19:06, Pavel Sanda a écrit : Can you try if you can see difference between 2.1 and master for this scenario: 1. set high speed rate for your keyboard: xset r rate 300 180 2. load user guide, fullscreen 3. Hold right arrow until you reach the end of the first page and count the time

Re: [PATCH] make string breaking faster

2016-07-07 Thread Pavel Sanda
Richard Heck wrote: Can you try if you can see difference between 2.1 and master for this scenario: 1. set high speed rate for your keyboard: xset r rate 300 180 2. load user guide, fullscreen 3. Hold right arrow until you reach the end of the first page and count the

Re: [PATCH] make string breaking faster

2016-07-07 Thread Richard Heck
On 07/07/2016 01:06 PM, Pavel Sanda wrote: Jean-Marc Lasgouttes wrote: Le 07/07/2016 ? 18:54, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: That's OK. But did you remove the PROFILE_xxx macros? They probably have an effect on performance. No visible effect for me. Can you try if you can

Re: [PATCH] make string breaking faster

2016-07-07 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > Le 07/07/2016 ? 18:54, Pavel Sanda a écrit : >> Jean-Marc Lasgouttes wrote: >>> That's OK. But did you remove the PROFILE_xxx macros? They probably have >>> an >>> effect on performance. >> >> No visible effect for me. >> >> Can you try if you can see difference betwe

Re: [PATCH] make string breaking faster

2016-07-07 Thread Jean-Marc Lasgouttes
Le 07/07/2016 à 18:54, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: That's OK. But did you remove the PROFILE_xxx macros? They probably have an effect on performance. No visible effect for me. Can you try if you can see difference between 2.1 and master for this scenario: 1. set high spe

Re: [PATCH] make string breaking faster

2016-07-07 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > That's OK. But did you remove the PROFILE_xxx macros? They probably have an > effect on performance. No visible effect for me. Can you try if you can see difference between 2.1 and master for this scenario: 1. set high speed rate for your keyboard: xset r rate 300 1

Re: [PATCH] make string breaking faster

2016-07-07 Thread Jean-Marc Lasgouttes
Le 07/07/2016 à 07:01, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: Le 05/07/2016 ? 18:34, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: Comments welcome. My plan is to use that for both Qt4 and Qt5 (for simplicity). Seeing the different behavior of Qt 4.8.1 and 4.8.7 (albeit differen

Re: [PATCH] make string breaking faster

2016-07-07 Thread Jean-Marc Lasgouttes
Le 07/07/2016 à 07:11, Pavel Sanda a écrit : Concerning this slowness, could you test the effect of the attached patch on your cursor test? I am looking for two kind of effects: performance and bugs. No help wrt performance. Pavel OK, I'll revert it. JMarc

Re: [PATCH] make string breaking faster

2016-07-06 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > Le 05/07/2016 ? 18:34, Pavel Sanda a écrit : >> Jean-Marc Lasgouttes wrote: >>> Comments welcome. My plan is to use that for both Qt4 and Qt5 (for >>> simplicity). Seeing the different behavior of Qt 4.8.1 and 4.8.7 (albeit >>> different machines), I suspect that the p

Re: [PATCH] make string breaking faster

2016-07-06 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > Le 05/07/2016 ? 18:34, Pavel Sanda a écrit : >> Jean-Marc Lasgouttes wrote: >>> Comments welcome. My plan is to use that for both Qt4 and Qt5 (for >>> simplicity). Seeing the different behavior of Qt 4.8.1 and 4.8.7 (albeit >>> different machines), I suspect that the p

Re: [PATCH] make string breaking faster

2016-07-06 Thread Jean-Marc Lasgouttes
Le 05/07/2016 à 18:34, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: Comments welcome. My plan is to use that for both Qt4 and Qt5 (for simplicity). Seeing the different behavior of Qt 4.8.1 and 4.8.7 (albeit different machines), I suspect that the problem is elsewhere in the configuration.

Re: [PATCH] make string breaking faster

2016-07-06 Thread Jean-Marc Lasgouttes
Le 05/07/2016 à 18:34, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: Comments welcome. My plan is to use that for both Qt4 and Qt5 (for simplicity). Seeing the different behavior of Qt 4.8.1 and 4.8.7 (albeit different machines), I suspect that the problem is elsewhere in the configuration.

Re: [PATCH] make string breaking faster

2016-07-05 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > Comments welcome. My plan is to use that for both Qt4 and Qt5 (for > simplicity). Seeing the different behavior of Qt 4.8.1 and 4.8.7 (albeit > different machines), I suspect that the problem is elsewhere in the > configuration. > > I would be glad to have numbers f

Re: [PATCH] make string breaking faster

2016-07-05 Thread Jean-Marc Lasgouttes
Le 05/07/2016 à 16:28, Richard Heck a écrit : Can you give a receipe for producing them? I'm ignorant about profiling. (In my case, this would be on Linux.) Actually, the patch is already instrumented (see below). So all you need to do is produce a build without run-time debugging. A good way

Re: [PATCH] make string breaking faster

2016-07-05 Thread Richard Heck
On 07/05/2016 10:06 AM, Jean-Marc Lasgouttes wrote: > The attached patch implements a cache around the function > GuiFontMetrics::breakAt, which has been identified as very slow by > Guillaume. To this end, I use a plain QCache object. > > This patch is also instrumented using pmprof.h. When I load

[PATCH] make string breaking faster

2016-07-05 Thread Jean-Marc Lasgouttes
The attached patch implements a cache around the function GuiFontMetrics::breakAt, which has been identified as very slow by Guillaume. To this end, I use a plain QCache object. This patch is also instrumented using pmprof.h. When I load the UserGuide, and move along the document using Cursor-