Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Pavel Sanda
On Wed, Jul 24, 2024 at 10:51:39PM +0200, Jean-Marc Lasgouttes wrote: > Le 24/07/2024 ?? 22:48, Pavel Sanda a écrit : > > I have difficulty to see any visible difference when it comes to the cursor > > speed in UG after your last patch (detecting changes in buffer before > > calling > > updatemacr

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Jean-Marc Lasgouttes
Le 24/07/2024 à 22:48, Pavel Sanda a écrit : I have difficulty to see any visible difference when it comes to the cursor speed in UG after your last patch (detecting changes in buffer before calling updatemacros), i.e. the difference seems to be within rounding error. The updateMacros probably i

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Pavel Sanda
On Wed, Jul 24, 2024 at 06:09:38PM +0200, Jean-Marc Lasgouttes wrote: > > > Are updateMacros called for each caret movement in the document? > > > If true this might be option how to improve the keyboard movement > > > speed little bit. > > > > Possibly, I have to check. > > The answer is yes ;)

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Jean-Marc Lasgouttes
Le 24/07/2024 à 01:57, Pavel Sanda a écrit : On top of that this speed up was good enough that I do not see visually noticeable hiccups while moving with the cursor in User Guide anymore - but that's also due to the fact that cursor moving is still somewhat slow on fast repeat rates compared to o

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Jean-Marc Lasgouttes
Le 24/07/2024 à 19:28, Scott Kostyshak a écrit : /home/scott/lyxbuilds/master-master/repo/src/insets/InsetTabular.h:1120:7: error: 'updateStatistics' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] void updateStatistics(Statistics & st

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Scott Kostyshak
On Wed, Jul 24, 2024 at 06:10:42PM GMT, Jean-Marc Lasgouttes wrote: > Le 24/07/2024 à 09:43, Jean-Marc Lasgouttes a écrit : > > > All in all this patch is nice piece of work! :) > > > > Thanks. It needs some cleanup, so I will push it later. > > I found the time, the code is now in. When compili

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Jean-Marc Lasgouttes
Le 24/07/2024 à 09:43, Jean-Marc Lasgouttes a écrit : All in all this patch is nice piece of work! :) Thanks. It needs some cleanup, so I will push it later. I found the time, the code is now in. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/ly

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Jean-Marc Lasgouttes
Le 24/07/2024 à 12:30, Jean-Marc Lasgouttes a écrit : Le 24/07/2024 à 09:55, Pavel Sanda a écrit : On Wed, Jul 24, 2024 at 09:43:43AM +0200, Jean-Marc Lasgouttes wrote: Good, that was the point. The code I proposed to avoid running updateMacros on an unchanged document can be used here too. A

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Jean-Marc Lasgouttes
Le 24/07/2024 à 09:55, Pavel Sanda a écrit : On Wed, Jul 24, 2024 at 09:43:43AM +0200, Jean-Marc Lasgouttes wrote: Good, that was the point. The code I proposed to avoid running updateMacros on an unchanged document can be used here too. Are updateMacros called for each caret movement in the

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Pavel Sanda
On Wed, Jul 24, 2024 at 09:43:43AM +0200, Jean-Marc Lasgouttes wrote: > Good, that was the point. The code I proposed to avoid running updateMacros > on an unchanged document can be used here too. Are updateMacros called for each caret movement in the document? If true this might be option how to

Re: [PATCH] WIP: rewrite statistics code

2024-07-24 Thread Jean-Marc Lasgouttes
Le 24 juillet 2024 01:57:01 GMT+02:00, Pavel Sanda a écrit : >I tested and do not see any counting difference in my selected document and >confirm that profiling gives about 3x better time with your patch. Thanks for testing. To be frank, I have been disappointed at first to have "only" a 3x s

Re: [PATCH] WIP: rewrite statistics code

2024-07-23 Thread Pavel Sanda
On Mon, Jul 22, 2024 at 01:37:38PM +0200, Pavel Sanda wrote: > > Please test. > > I'll hopefully do in the next days. I tested and do not see any counting difference in my selected document and confirm that profiling gives about 3x better time with your patch. On top of that this speed up was go

Re: [PATCH] WIP: rewrite statistics code

2024-07-22 Thread Pavel Sanda
On Mon, Jul 22, 2024 at 12:32:28AM +0200, Jean-Marc Lasgouttes wrote: > The statistics code is known to be very slow, because it relies on > DocIterator to go through the buffer. One more idea how to speedup the feedback from the discussions in trac: trigger the update once the key/button is relea