Re: [Patch] Qt font caching fix

2006-05-24 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Andre Poenitz wrote: >> On Tue, May 23, 2006 at 12:52:14PM +0200, Jean-Marc Lasgouttes >> wrote: >>> I see no reason it would not work. If you want to check you could >>> add a lyxerr statement everytime a new QLFontIn

Re: [Patch] Qt font caching fix

2006-05-24 Thread Abdelrazak Younes
Andre Poenitz wrote: On Tue, May 23, 2006 at 12:52:14PM +0200, Jean-Marc Lasgouttes wrote: I see no reason it would not work. If you want to check you could add a lyxerr statement everytime a new QLFontInfo has to be created. I think you will see by yourself what happens. Seeing the confusion

Re: [Patch] Qt font caching fix

2006-05-24 Thread Abdelrazak Younes
Andre Poenitz wrote: On Tue, May 23, 2006 at 12:41:33PM +0200, Abdelrazak Younes wrote: So the trick was the '* &' instead of a simple '*'. Erm. Yes. I didn't know about that indeed and I actually _asked_ to the list what is the reason for the additional '&' but nobody answered. I've notic

Re: [Patch] Qt font caching fix

2006-05-23 Thread Andre Poenitz
On Tue, May 23, 2006 at 12:52:14PM +0200, Jean-Marc Lasgouttes wrote: > I see no reason it would not work. If you want to check you could add > a lyxerr statement everytime a new QLFontInfo has to be created. I > think you will see by yourself what happens. Seeing the confusion adding a comment se

Re: [Patch] Qt font caching fix

2006-05-23 Thread Andre Poenitz
On Tue, May 23, 2006 at 12:41:33PM +0200, Abdelrazak Younes wrote: > So the trick was the '* &' instead of a simple '*'. Erm. Yes. > I didn't know about that indeed and I actually _asked_ to the list > what is the reason for the additional '&' but nobody answered. I've noticed the question but w

Re: [Patch] Qt font caching fix

2006-05-23 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> So the trick was the '* &' instead of a simple '*'. I Abdelrazak> didn't know about that indeed and I actually _asked_ to Abdelrazak> the list what is the reason for the additional '&' but Abdelrazak> nobody answered.

Re: [Patch] Qt font caching fix

2006-05-23 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Maybe my code is wrong but I'd really like to know why. Abdelrazak> All I am doing is saving the pointer in the table. The Abdelrazak> second time a font that has the same characteristics is

Re: [Patch] Qt font caching fix

2006-05-23 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Maybe my code is wrong but I'd really like to know why. Abdelrazak> All I am doing is saving the pointer in the table. The Abdelrazak> second time a font that has the same characteristics is Abdelrazak> required, inste

Re: [Patch] Qt font caching fix

2006-05-23 Thread Abdelrazak Younes
Andre Poenitz a écrit : On Sat, May 20, 2006 at 05:08:34PM +0200, Abdelrazak Younes wrote: Index: src/frontends/qt3/qfont_loader.h === --- src/frontends/qt3/qfont_loader.h(revision 13887) +++ src/frontends/qt3/qfont_loader.h

Re: [Patch] Qt font caching fix

2006-05-23 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Would you care to explain the difference between what has been there and what you have now? Martin> Good question. I didn't see either that this had anything to Martin> do with caching as Abdel claims, but

Re: [Patch] Qt font caching fix

2006-05-23 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: >> Would you care to explain the difference between what has been >> there and what you have now? Martin> Good question. I didn't see either that this had anything to Martin> do with caching as Abdel claims, but didn't feel certain Mart

Re: [Patch] Qt font caching fix

2006-05-22 Thread Martin Vermeer
On Mon, May 22, 2006 at 07:01:20PM +0200, Andre Poenitz wrote: > On Sat, May 20, 2006 at 05:08:34PM +0200, Abdelrazak Younes wrote: > > Index: src/frontends/qt3/qfont_loader.h > > === > > --- src/frontends/qt3/qfont_loader.h(re

Re: [Patch] Qt font caching fix

2006-05-22 Thread Andre Poenitz
On Mon, May 22, 2006 at 11:21:30AM +0200, Abdelrazak Younes wrote: > Jean-Marc Lasgouttes a écrit : > >>"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: > > > >Abdelrazak> I am going to commit the qt4 part of this patch for now. > >Abdelrazak> If you want the qt3 part also just tel

Re: [Patch] Qt font caching fix

2006-05-22 Thread Andre Poenitz
On Sat, May 20, 2006 at 05:08:34PM +0200, Abdelrazak Younes wrote: > Index: src/frontends/qt3/qfont_loader.h > === > --- src/frontends/qt3/qfont_loader.h (revision 13887) > +++ src/frontends/qt3/qfont_loader.h (working copy) > @@ -83

Re: [Patch] Qt font caching fix

2006-05-22 Thread Bennett Helm
On Mon, 2006-05-22 at 11:21 +0200, Abdelrazak Younes wrote: > But I expect the speedup would be most significant on Mac and I am > waiting for Bennett to do some more profiling. I don't care much about > qt3 speed personally but I have read here and there that Lyx-1.4 is slow > on Mac... Don't

Re: [Patch] Qt font caching fix

2006-05-22 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> I am going to commit the qt4 part of this patch for now. Abdelrazak> If you want the qt3 part also just tell me. The question is: what speedup do you get, if any? On linux probably nothin

Re: [Patch] Qt font caching fix

2006-05-22 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> I am going to commit the qt4 part of this patch for now. Abdelrazak> If you want the qt3 part also just tell me. The question is: what speedup do you get, if any? JMarc

Re: [Patch] Qt font caching fix

2006-05-21 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : There is no caching either in qt3. I guess we've found a nice optimisation to do :-) I'll send a patch soon! Font caching was not done in qt3 and qt4, this patch fixes this. Please test on linux/qt[34] and Mac/qt[34] I am going to commit the qt4 part of this patc

[Patch] Qt font caching fix

2006-05-20 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Abdelrazak Younes a écrit : Martin Vermeer a écrit : It doesn't look to me that this is caching anything. Is it? Right, now I look at it, it should be something like this: if (!fi) fi = new QLFontInfo(f); fontinfo_[f.family()][f.series()][f.realShape()][