Re: rowpainter.C: unused var

2006-10-23 Thread Asger Ottar Alstrup

Jean-Marc Lasgouttes wrote:

"Andre" == Andre Pönitz <[EMAIL PROTECTED]> writes:



I guess this is not something I can consider for 1.4.


Andre> If we don't get mispositioning/coordcache crashes in 1.4, then
Andre> not.

I do have crashes with pageup in 1.4.


Then the nullpainter fix is your medicine.

Regards,
Asger



Re: rowpainter.C: unused var

2006-10-23 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Pönitz <[EMAIL PROTECTED]> writes:

>> I guess this is not something I can consider for 1.4.

Andre> If we don't get mispositioning/coordcache crashes in 1.4, then
Andre> not.

I do have crashes with pageup in 1.4.

JMarc



Re: rowpainter.C: unused var

2006-10-23 Thread Andre Pönitz

Quoting Abdelrazak Younes <[EMAIL PROTECTED]>:
This was exactly what I was investigation some months ago. But then 
why not going to QPicture directly? This will need some changes to 
the core but I really think that's the way to go.


I would be very surprised if recording the painter operations
either manually or using QPicture would improve performance.

Andre'




Re: rowpainter.C: unused var

2006-10-23 Thread Abdelrazak Younes

Lars Gullik Bjønnes wrote:

Abdelrazak Younes <[EMAIL PROTECTED]> writes:

| Asger Ottar Alstrup wrote:
| > Jean-Marc Lasgouttes wrote:
| >> I see. Isn't there some performance price?
| > Yes, but it is not noticeable in our testing. After all, we only
| > paint two extra paragraphs.
| >
| >> I guess this is not something I can consider for 1.4.
| > Sure it is. Without, the coord cache is full of crap, and that
| > causes assertions and crashes.
| > [Smarter redraw]
| >> Are there plans to implement that for 1.5?
| > We have looked a lot on performance work for 1.5, we have done a lot
| > of profiling, but there are no easy ways out.
| 
| Did you investigate if the emission Buffer::changed() instead of

| direct WorkArea::redraw call was the real culprit of Lars reported
| typing slowness?

that slowness was actually caused by my X server goin haywire.


Ahh... very good news! I was quite proud of this signal solution.


It is
quite fast now, but could still be faster.


Year...

Abdel.



Re: rowpainter.C: unused var

2006-10-23 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes:

| Asger Ottar Alstrup wrote:
| > Jean-Marc Lasgouttes wrote:
| >> I see. Isn't there some performance price?
| > Yes, but it is not noticeable in our testing. After all, we only
| > paint two extra paragraphs.
| >
| >> I guess this is not something I can consider for 1.4.
| > Sure it is. Without, the coord cache is full of crap, and that
| > causes assertions and crashes.
| > [Smarter redraw]
| >> Are there plans to implement that for 1.5?
| > We have looked a lot on performance work for 1.5, we have done a lot
| > of profiling, but there are no easy ways out.
| 
| Did you investigate if the emission Buffer::changed() instead of
| direct WorkArea::redraw call was the real culprit of Lars reported
| typing slowness?

that slowness was actually caused by my X server goin haywire. It is
quite fast now, but could still be faster.

-- 
Lgb



Re: rowpainter.C: unused var

2006-10-23 Thread Andre Pönitz

Quoting Jean-Marc Lasgouttes <[EMAIL PROTECTED]>:


"Andre" == Andre Pönitz <[EMAIL PROTECTED]> writes:


Andre> With the real one.

Could you point me to one or two commits that implement this?


15455 maybe.


Andre> The problem was that the nullpainter did not compute positions
Andre> correctly. If it did so, it would need to use almost the same
Andre> logic as the real painter and some (if not most) of its speed
Andre> advantage would have gone.

I see. Isn't there some performance price?


Probably, yes. OTOH some things are quite a bit faster now, so
it's hard to tell.


I guess this is not something I can consider for 1.4.


If we don't get mispositioning/coordcache crashes in 1.4, then
not.


Andre> Maybe we could have a position-coputing-non-painting
Andre> nullpainter, but there's also an option of doing sort of 'lazy'
Andre> metrics computation for the off-screen paragraphs. We do need
Andre> their metrics only for page up/down, yet compute it always
Andre> right now.

Are there plans to implement that for 1.5?


Not so far as I can tell.

There are probably easier ways to may things faster...
Andre'



Re: rowpainter.C: unused var

2006-10-23 Thread Abdelrazak Younes

Asger Ottar Alstrup wrote:

Jean-Marc Lasgouttes wrote:

I see. Isn't there some performance price?


Yes, but it is not noticeable in our testing. After all, we only paint 
two extra paragraphs.



I guess this is not something I can consider for 1.4.


Sure it is. Without, the coord cache is full of crap, and that causes 
assertions and crashes.


[Smarter redraw]

Are there plans to implement that for 1.5?


We have looked a lot on performance work for 1.5, we have done a lot of 
profiling, but there are no easy ways out.


Did you investigate if the emission Buffer::changed() instead of direct 
WorkArea::redraw call was the real culprit of Lars reported typing slowness?



The best bet is André's patch 
which will avoid an extra copy of the complete workarea pixmap. That 
should help a lot, especially on windows.


Interesting.



Other than that, we strongly suggest to wait until 1.6 for this work, 
because it will require time to stabilize. The reasoning is this: 1.4 is 
dead slow, 1.5 can be as well.


Ideas for doing less drawing include:

- Reintroduce the "draw only this paragraph" optimisation from the old 
days. This is a little complicated, because that means we have to only 
clear out part of the coord cache, and then rebuild just that part.


- Add a caching layer in the painter. Instead of drawing, collect all 
drawing requests in a data-structure. The first time, just draw on the 
screen from this data structure. Then remember the data-structure which 
illustrates what is on the screen. When the next redraw comes, collect 
all the drawing requests in a new instance of the data structure. Then 
start comparing from the start and end of the old and the new 
datastructures to find the middle part which is different. This will 
correspond to the part of the screen which will need to be updated. Then 
do just those paints. Extend the middle part until you get background 
fill requests, because then we now the drawing requests are selfcontained.


This was exactly what I was investigation some months ago. But then why 
not going to QPicture directly? This will need some changes to the core 
but I really think that's the way to go.


Abdel.



Re: rowpainter.C: unused var

2006-10-23 Thread Asger Ottar Alstrup

Jean-Marc Lasgouttes wrote:

I see. Isn't there some performance price?


Yes, but it is not noticeable in our testing. After all, we only paint 
two extra paragraphs.



I guess this is not something I can consider for 1.4.


Sure it is. Without, the coord cache is full of crap, and that causes 
assertions and crashes.


[Smarter redraw]

Are there plans to implement that for 1.5?


We have looked a lot on performance work for 1.5, we have done a lot of 
profiling, but there are no easy ways out. The best bet is André's patch 
which will avoid an extra copy of the complete workarea pixmap. That 
should help a lot, especially on windows.


Other than that, we strongly suggest to wait until 1.6 for this work, 
because it will require time to stabilize. The reasoning is this: 1.4 is 
dead slow, 1.5 can be as well.


Ideas for doing less drawing include:

- Reintroduce the "draw only this paragraph" optimisation from the old 
days. This is a little complicated, because that means we have to only 
clear out part of the coord cache, and then rebuild just that part.


- Add a caching layer in the painter. Instead of drawing, collect all 
drawing requests in a data-structure. The first time, just draw on the 
screen from this data structure. Then remember the data-structure which 
illustrates what is on the screen. When the next redraw comes, collect 
all the drawing requests in a new instance of the data structure. Then 
start comparing from the start and end of the old and the new 
datastructures to find the middle part which is different. This will 
correspond to the part of the screen which will need to be updated. Then 
do just those paints. Extend the middle part until you get background 
fill requests, because then we now the drawing requests are selfcontained.


Regards,
Asger



Re: rowpainter.C: unused var

2006-10-23 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Pönitz <[EMAIL PROTECTED]> writes:

Andre> With the real one.

Could you point me to one or two commits that implement this? 

Andre> The problem was that the nullpainter did not compute positions
Andre> correctly. If it did so, it would need to use almost the same
Andre> logic as the real painter and some (if not most) of its speed
Andre> advantage would have gone.

I see. Isn't there some performance price?

I guess this is not something I can consider for 1.4.

Andre> Maybe we could have a position-coputing-non-painting
Andre> nullpainter, but there's also an option of doing sort of 'lazy'
Andre> metrics computation for the off-screen paragraphs. We do need
Andre> their metrics only for page up/down, yet compute it always
Andre> right now.

Are there plans to implement that for 1.5?

JMarc


Re: rowpainter.C: unused var

2006-10-23 Thread Andre Pönitz

Quoting Jean-Marc Lasgouttes <[EMAIL PROTECTED]>:


"Asger" == Asger Ottar Alstrup <[EMAIL PROTECTED]> writes:


Asger> Michael Gerz wrote:

/home/software/lyx-trunk/src/rowpainter.C:865: warning: unused
variable `const bool inside'

 Asger, is it safe to remove the variable?


Asger> Yes, and you can nuke the nullpainter as well while you are at
Asger> it.

Asger> The nullpainter is no good, because it can not calculate the
Asger> metrics of text, so it's basically useless. It was the cause of
Asger> wrong metrics in the coordcache, which caused all sorts of
Asger> problems.

what did you replace it with?


With the real one.

The problem was that the nullpainter did not compute positions correctly.
If it did so, it would need to use almost the same logic as the real painter
and some (if not most) of its speed advantage would have gone.

Maybe we could have a position-coputing-non-painting nullpainter, but 
there's also an option of doing sort of 'lazy' metrics computation for

the off-screen paragraphs. We do need their metrics only for page up/down,
yet compute it always right now.

Andre'



Re: rowpainter.C: unused var

2006-10-23 Thread Asger Ottar Alstrup

Jean-Marc Lasgouttes wrote:

Asger> The nullpainter is no good, because it can not calculate the
Asger> metrics of text, so it's basically useless. It was the cause of
Asger> wrong metrics in the coordcache, which caused all sorts of
Asger> problems.

what did you replace it with?


We use the real painter.

Regards,
Asger



Re: rowpainter.C: unused var

2006-10-23 Thread Jean-Marc Lasgouttes
> "Asger" == Asger Ottar Alstrup <[EMAIL PROTECTED]> writes:

Asger> Michael Gerz wrote:
 /home/software/lyx-trunk/src/rowpainter.C:865: warning: unused
 variable `const bool inside'
>>  Asger, is it safe to remove the variable?

Asger> Yes, and you can nuke the nullpainter as well while you are at
Asger> it.

Asger> The nullpainter is no good, because it can not calculate the
Asger> metrics of text, so it's basically useless. It was the cause of
Asger> wrong metrics in the coordcache, which caused all sorts of
Asger> problems.

what did you replace it with?

JMarc


Re: rowpainter.C: unused var

2006-10-22 Thread Asger Ottar Alstrup

Michael Gerz wrote:
/home/software/lyx-trunk/src/rowpainter.C:865: warning: unused 
variable `const

 bool inside'

>

Asger, is it safe to remove the variable?


Yes, and you can nuke the nullpainter as well while you are at it.

The nullpainter is no good, because it can not calculate the metrics of 
text, so it's basically useless. It was the cause of wrong metrics in 
the coordcache, which caused all sorts of problems.


Regards,
Asger



Re: rowpainter.C: unused var

2006-10-22 Thread Michael Gerz

Asger Ottar Alstrup wrote:


Yes, and you can nuke the nullpainter as well while you are at it.

The nullpainter is no good, because it can not calculate the metrics 
of text, so it's basically useless. It was the cause of wrong metrics 
in the coordcache, which caused all sorts of problems.


Please do it by yourself. I have no idea about what a nullpainter is and 
I have to leave soon.


Thanks! Michael


Re: rowpainter.C: unused var

2006-10-22 Thread Michael Gerz

Martin Vermeer wrote:


On Sun, Oct 22, 2006 at 04:40:13PM +0200, Michael Gerz wrote:
 


This one look suspicious:

/home/software/lyx-trunk/src/rowpainter.C:865: warning: unused variable 
`const

 bool inside'

Michael
   



Yes, Asger threw the nullpainter out (r15455).

(Probably left behind when working on the performance problems we tried to
fix, esp. on the Mac)
 


Asger, is it safe to remove the variable?

Michael



Re: rowpainter.C: unused var

2006-10-22 Thread Martin Vermeer
On Sun, Oct 22, 2006 at 04:40:13PM +0200, Michael Gerz wrote:
> This one look suspicious:
> 
> /home/software/lyx-trunk/src/rowpainter.C:865: warning: unused variable 
> `const
>   bool inside'
> 
> Michael

Yes, Asger threw the nullpainter out (r15455).

(Probably left behind when working on the performance problems we tried to
fix, esp. on the Mac)

- Martin



pgphSEs9PtORb.pgp
Description: PGP signature


Re: rowpainter.C

2006-04-07 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

Martin> On Thu, Apr 06, 2006 at 05:34:55PM +0200, Michael Gerz wrote:
>> Martin ???
>> 
>> diff -w -r --exclude=.svn --exclude=boost --exclude=po
>> --exclude=ChangeLog lyx-devel-1.4.X/src/rowpainter.C lyx-d
>> evel-1.5.0/src/rowpainter.C 756c756 < && sl.pos() < rit->endpos())
>> --- > && sl.pos() <= rit->endpos())

Martin> Damn. Fix it! (again, sigh)

I did that,

JMarc


Re: rowpainter.C

2006-04-06 Thread Martin Vermeer
On Thu, Apr 06, 2006 at 05:34:55PM +0200, Michael Gerz wrote:
> Martin ???
> 
> diff -w -r --exclude=.svn --exclude=boost --exclude=po 
> --exclude=ChangeLog lyx-devel-1.4.X/src/rowpainter.C lyx-d
> evel-1.5.0/src/rowpainter.C
> 756c756
> <   && sl.pos() < rit->endpos())
> ---
> >   && sl.pos() <= rit->endpos())

Damn. Fix it! (again, sigh)

- Martin
 


pgpxTIj6tSfdR.pgp
Description: PGP signature