Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-09 Thread Enrico Forestieri
On Fri, Dec 08, 2006 at 08:02:26PM +0100, Enrico Forestieri wrote: > Please find attached a patch revised along your observations. However, > now I feel quite uncomfortable with applying a patch which I don't > fully understand... I could not discover any strange side effect, so I committed it.

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-09 Thread Enrico Forestieri
On Thu, Dec 07, 2006 at 05:13:08PM +0100, Jean-Marc Lasgouttes wrote: > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > Enrico> I did that, even if I still cannot see any improvement on > Enrico> *nix. Anyway, the memory penalty is less than about 200 Kbytes > Enrico> for any

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-08 Thread Andre Poenitz
On Thu, Dec 07, 2006 at 09:42:24PM +0100, Enrico Forestieri wrote: > On Thu, Dec 07, 2006 at 06:20:07PM +0100, Andre Poenitz wrote: > > On Thu, Dec 07, 2006 at 04:03:27PM +0100, Enrico Forestieri wrote: > > > + QRect const & r = metrics.boundingRect(c); > > > + // Qt/Win 3.2.1nc (at least) corrects

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-08 Thread Enrico Forestieri
On Fri, Dec 08, 2006 at 04:23:23PM +0100, Jean-Marc Lasgouttes wrote: > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > Enrico> Jean-Marc, may I apply the attached patch? It is unrelated to > Enrico> bug 2900. > > It looks like a good idea, but wouldn't it be even better to r

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-08 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> Jean-Marc, may I apply the attached patch? It is unrelated to Enrico> bug 2900. It looks like a good idea, but wouldn't it be even better to replace - updated |= cursorUp(cur); + + if (cur.inMathed()) +

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-08 Thread Helge Hafting
Enrico Forestieri wrote: I did that, even if I still cannot see any improvement on *nix. Anyway, the memory penalty is less than about 200 Kbytes for any document I test it with. I routinely run linux-LyX over and ADSL line. This mode of display need every optimization it can get. :-) Helge Ha

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> On Thu, Dec 07, 2006 at 04:03:27PM +0100, Enrico Forestieri Andre> wrote: >> + QRect const & r = metrics.boundingRect(c); + // Qt/Win 3.2.1nc >> (at least) corrects the GetGlyphOutlineA|W y + // value by the >> height: (x, -y-height

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Bennett Helm
On Dec 7, 2006, at 10:03 AM, Enrico Forestieri wrote: On Thu, Dec 07, 2006 at 03:18:44PM +0100, Jean-Marc Lasgouttes wrote: "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: I'd still like this patch to be done in a slightly cleaner way. Currently, one can see that the special code

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Enrico Forestieri
On Thu, Dec 07, 2006 at 06:20:07PM +0100, Andre Poenitz wrote: > On Thu, Dec 07, 2006 at 04:03:27PM +0100, Enrico Forestieri wrote: > > + QRect const & r = metrics.boundingRect(c); > > + // Qt/Win 3.2.1nc (at least) corrects the GetGlyphOutlineA|W y > > + // value by the height: (x, -y-height

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Andre Poenitz
On Thu, Dec 07, 2006 at 04:03:27PM +0100, Enrico Forestieri wrote: > + QRect const & r = metrics.boundingRect(c); > + // Qt/Win 3.2.1nc (at least) corrects the GetGlyphOutlineA|W y > + // value by the height: (x, -y-height, width, height). > + // Other versions return: (x, -y, width

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Enrico Forestieri
On Thu, Dec 07, 2006 at 09:47:56AM +0100, Abdelrazak Younes wrote: > Enrico Forestieri wrote: ... > >BTW, I noticed that LyX crashes if you press page down right after > >loading this document: > >http://bugzilla.lyx.org/attachment.cgi?id=1296&action=view > > I cannot access this link and 1296 doe

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> I did that, even if I still cannot see any improvement on Enrico> *nix. Anyway, the memory penalty is less than about 200 Kbytes Enrico> for any document I test it with. Enrico> With this patch LyX/Win 1.4 is again on a par w

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Enrico Forestieri
On Thu, Dec 07, 2006 at 03:18:44PM +0100, Jean-Marc Lasgouttes wrote: > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > >> I'd still like this patch to be done in a slightly cleaner way. > >> Currently, one can see that the special code for qt 3.2.1nc is > >> copied in two dif

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: >> I'd still like this patch to be done in a slightly cleaner way. >> Currently, one can see that the special code for qt 3.2.1nc is >> copied in two different file. Enrico, you should model the >> ascent/descent caching code on the

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Enrico Forestieri
On Thu, Dec 07, 2006 at 10:09:00AM +0100, Jean-Marc Lasgouttes wrote: > > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > > Georg> Am Mittwoch, 6. Dezember 2006 23:32 schrieb Enrico Forestieri: > >> LyX 1.4 is now usable at least as 1.3.7 was on Windows ;-) > > Georg> If that is the case

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Enrico Forestieri
On Thu, Dec 07, 2006 at 09:47:56AM +0100, Abdelrazak Younes wrote: > Enrico Forestieri wrote: ... > >Index: src/frontends/qt2/qfont_loader.h > >=== > >--- src/frontends/qt2/qfont_loader.h (revision 16192) > >+++ src/frontends/qt2/qfont

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Enrico Forestieri
On Thu, Dec 07, 2006 at 09:47:56AM +0100, Abdelrazak Younes wrote: > Enrico Forestieri wrote: ... > >Please, find attached a patch that caches ascent and descent values > >on Windows and Mac. I don't activate the cache on *nix because I > >cannot see a noticeable improvement (I could have sworn I w

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Am Mittwoch, 6. Dezember 2006 23:32 schrieb Enrico Forestieri: >> LyX 1.4 is now usable at least as 1.3.7 was on Windows ;-) Georg> If that is the case I suggest to immediately release 1.4.4. A Georg> lot of other fixes have accumulat

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Martin Vermeer
On Thu, Dec 07, 2006 at 09:47:56AM +0100, Abdelrazak Younes wrote: ... > >Of course, after I got my coffee it occurred to me that I should had > >not tried to backport the patch but rather its philosopy... > > Right! > Good job ;-) +1 > >Please, find attached a patch that caches ascent and d

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Georg Baum
Am Mittwoch, 6. Dezember 2006 23:32 schrieb Enrico Forestieri: > LyX 1.4 is now usable at least as 1.3.7 was on Windows ;-) If that is the case I suggest to immediately release 1.4.4. A lot of other fixes have accumulated, and IMHO this one alone would justify a release. We can then still see w

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-07 Thread Abdelrazak Younes
Enrico Forestieri wrote: On Wed, Dec 06, 2006 at 04:30:09PM +0100, Jean-Marc Lasgouttes wrote: "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: I would be very interested, but I will need a windows user to do that for me, since I cannot really test. Anyway caching ascent and descent l

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-06 Thread Enrico Forestieri
On Wed, Dec 06, 2006 at 04:30:09PM +0100, Jean-Marc Lasgouttes wrote: > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > >> I would be very interested, but I will need a windows user to do > >> that for me, since I cannot really test. Anyway caching ascent and > >> descent looks l

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-06 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: >> I would be very interested, but I will need a windows user to do >> that for me, since I cannot really test. Anyway caching ascent and >> descent looks like a good idea. Enrico> Jean-Marc are you looking at this? I had a quick loo

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-06 Thread Enrico Forestieri
On Fri, Dec 01, 2006 at 10:40:59PM +0100, Jean-Marc Lasgouttes wrote: > > "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: > > Abdelrazak> Good news for Windows and Mac users, this bug is now > Abdelrazak> fixed: http://bugzilla.lyx.org/show_bug.cgi?id=2900 > > Abdelrazak> Jean-M

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-02 Thread Abdelrazak Younes
Georg Baum wrote: Am Freitag, 1. Dezember 2006 21:08 schrieb Andre Poenitz: On Fri, Dec 01, 2006 at 05:26:43PM +0100, Georg Baum wrote: Yes. Then you make it clear that the qt4 frontend can only handle ucs2. Which is wrong as far as I have been told. Qt 4 is supposed to be able to render the f

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-02 Thread Abdelrazak Younes
Georg Baum wrote: Am Samstag, 2. Dezember 2006 00:29 schrieb Abdelrazak Younes: None that I see. I will recompile with Debug to see if there's any assertion triggered but I am quite confident that this was the only problem. Because the assertion happpened at the same line when scrolling >from

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-02 Thread Georg Baum
Am Samstag, 2. Dezember 2006 00:29 schrieb Abdelrazak Younes: > None that I see. I will recompile with Debug to see if there's any > assertion triggered but I am quite confident that this was the only > problem. Because the assertion happpened at the same line when scrolling > >from top or from

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-02 Thread Georg Baum
Am Freitag, 1. Dezember 2006 21:08 schrieb Andre Poenitz: > On Fri, Dec 01, 2006 at 05:26:43PM +0100, Georg Baum wrote: > > Yes. Then you make it clear that the qt4 frontend can only handle ucs2. > > Which is wrong as far as I have been told. Qt 4 is supposed to be able > to render the full unicod

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-02 Thread Andre Poenitz
On Fri, Dec 01, 2006 at 05:26:43PM +0100, Georg Baum wrote: > Abdelrazak Younes wrote: > > > By the way, around section 6.2 of the UserGuide there are some accent > > characters which are bigger than 65536. > > Which ones? I suspect that something is going wrong there. > > > Shall I add an asser

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Anyway caching ascent and descent looks like a good idea. Abdelrazak> The only drawback is that it requires about 20Mo Abdelrazak> extra-memory when loading the UserGuide. If it turns out Abdelrazak> to be too much, we can switch to a QHash based solution Abdelrazak> inst

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Georg Baum wrote: Am Freitag, 1. Dezember 2006 18:27 schrieb Abdelrazak Younes: It is the hungarian umlaut apparently that gives this weird value. Looking at what's on screen, this is no surprise really... Now fixed. Indeed. Thanks. Do you see any other strange character? None that I se

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: What about using short ints instead of ints? Bo> I do not know what exactly is going on here, but if there are a Bo> lot of duplicates, std::map should help. A std::map is what we had, but a vector is faster. Of course t

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Good news for Windows and Mac users, this bug is now Abdelrazak> fixed: http://bugzilla.lyx.org/show_bug.cgi?id=2900 Abdelrazak> Jean-Marc, I think you can backport to 1.4 the ascent() Abdelra

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: >> What about using short ints instead of ints? Bo> I do not know what exactly is going on here, but if there are a Bo> lot of duplicates, std::map should help. A std::map is what we had, but a vector is faster. Of course the downside is that it c

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Bo Peng
What about using short ints instead of ints? I do not know what exactly is going on here, but if there are a lot of duplicates, std::map should help. Bo

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Good news for Windows and Mac users, this bug is now Abdelrazak> fixed: http://bugzilla.lyx.org/show_bug.cgi?id=2900 Abdelrazak> Jean-Marc, I think you can backport to 1.4 the ascent() Abdelrazak> and descent() part o

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Georg Baum
Am Freitag, 1. Dezember 2006 18:27 schrieb Abdelrazak Younes: > It is the hungarian umlaut apparently that gives this weird value. > Looking at what's on screen, this is no surprise really... Now fixed. Do you see any other strange character? Georg

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Georg Baum wrote: Abdelrazak Younes wrote: By the way, around section 6.2 of the UserGuide there are some accent characters which are bigger than 65536. Which ones? I suspect that something is going wrong there. It happens when displaying the line after the macron

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Georg Baum wrote: Abdelrazak Younes wrote: By the way, around section 6.2 of the UserGuide there are some accent characters which are bigger than 65536. Which ones? I suspect that something is going wrong there. It happens when displaying the line after the macron accent related line. The

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Bo Peng
Abdelrazak Younes wrote: > Good news for Windows and Mac users, this bug is now fixed: Another good news is that I am now at 13 seconds for the UserGuide scrolling test :-) Congratulations and many thanks. Now you need to improve the performance of multiple windows. I have been working on two d

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Georg Baum wrote: Abdelrazak Younes wrote: Georg Baum wrote: Abdelrazak Younes wrote: By the way, around section 6.2 of the UserGuide there are some accent characters which are bigger than 65536. Which ones? I suspect that something is going wrong there. I'll investigate. Thanks. Shal

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Georg Baum
Abdelrazak Younes wrote: > Georg Baum wrote: >> Abdelrazak Younes wrote: >> >>> By the way, around section 6.2 of the UserGuide there are some accent >>> characters which are bigger than 65536. >> >> Which ones? I suspect that something is going wrong there. > > I'll investigate. Thanks. >>>

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Good news for Windows and Mac users, this bug is now fixed: Another good news is that I am now at 13 seconds for the UserGuide scrolling test :-) Abdel.

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Georg Baum wrote: Abdelrazak Younes wrote: By the way, around section 6.2 of the UserGuide there are some accent characters which are bigger than 65536. Which ones? I suspect that something is going wrong there. I'll investigate. Shall I add an assertion for those cases? Yes. But th

Re: Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Georg Baum
Abdelrazak Younes wrote: > By the way, around section 6.2 of the UserGuide there are some accent > characters which are bigger than 65536. Which ones? I suspect that something is going wrong there. > Shall I add an assertion for > those cases? Yes. Then you make it clear that the qt4 frontend

Bug 2900: LyX with lots of math slow on Windows

2006-12-01 Thread Abdelrazak Younes
Good news for Windows and Mac users, this bug is now fixed: http://bugzilla.lyx.org/show_bug.cgi?id=2900 Jean-Marc, I think you can backport to 1.4 the ascent() and descent() part of the patch. I am quite confident that this alone will solve most speed problem in 1.4 also. By the way, around