Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-11 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 11:49:58PM +, Angus Leeming wrote: Lars Gullik Bjønnes [EMAIL PROTECTED] writes: I'll go into non-grumpy-mode after 1.4.0 is released (and when I have this subversion thing up and going) At least I will do my best to. That'd be a shame. I quite enjoyed grumpy.

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-11 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 11:56:56PM +0100, Abdelrazak Younes wrote: Andre Poenitz a écrit : -class ParagraphList : public std::vectorParagraph +using namespace std; Please no 'using' in headers. Sure, this was just a quickly made proof of concept. - ParagraphList::const_iterator p =

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-11 Thread Andre Poenitz
On Fri, Feb 10, 2006 at 03:34:52PM +0100, Jean-Marc Lasgouttes wrote: Since our iterators store offsets (the pit, which are more stable than a real iterator), we need direct access. I think we need both interfaces. *nod* Andre'

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-11 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 09:57:57PM +0100, Andre' Poenitz wrote: iterator based interface. While it might be more clumsy to us, s/us,/use,/ Andre'

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-11 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 11:49:58PM +, Angus Leeming wrote: > Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > > I'll go into non-grumpy-mode after 1.4.0 is released (and when I have > > this subversion thing up and going) > > At least I will do my best to. > > That'd be a shame. I quite

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-11 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 11:56:56PM +0100, Abdelrazak Younes wrote: > Andre Poenitz a écrit : > >>-class ParagraphList : public std::vector > >>+using namespace std; > > > >Please no 'using' in headers. > > Sure, this was just a quickly made proof of concept. > > >>-

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-11 Thread Andre Poenitz
On Fri, Feb 10, 2006 at 03:34:52PM +0100, Jean-Marc Lasgouttes wrote: > Since our iterators store offsets (the pit, which are more stable than > a real iterator), we need direct access. > > I think we need both interfaces. *nod* Andre'

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-11 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 09:57:57PM +0100, Andre' Poenitz wrote: > iterator based interface. While it might be more clumsy to us, s/us,/use,/ Andre'

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Abdelrazak Younes
Angus Leeming a écrit : Ah... This is because I didn't go to the full monty... I forgot to erase those three lines: - advance(first, first_pit); - ParagraphList::const_iterator last = plist.begin(); - advance(last, last_pit + 1); It is better now,

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Angus Leeming a écrit : Ah... This is because I didn't go to the full monty... I forgot to erase those three lines: - advance(first, first_pit); - ParagraphList::const_iterator last = plist.begin(); - advance(last, last_pit + 1); It is

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Angus Leeming
Abdelrazak Younes [EMAIL PROTECTED] writes: By the way, right now, there are multiple instances in the code where operator[] access is used. Thus implying that we must present a position type interface (vector alike). At the same time, like in the case above, there are instances where the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Jean-Marc Lasgouttes
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Abdelrazak Younes [EMAIL PROTECTED] writes: By the way, right now, there are multiple instances in the code where operator[] access is used. Thus implying that we must present a position type interface (vector alike). At the same time,

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak By the way, right now, there are multiple instances in the Abdelrazak code where operator[] access is used. Thus implying that Abdelrazak we must present a position type interface (vector alike). Abdelrazak At the same time,

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Abdelrazak Younes
Angus Leeming a écrit : Ah... This is because I didn't go to the full monty... I forgot to erase those three lines: - advance(first, first_pit); - ParagraphList::const_iterator last = plist.begin(); - advance(last, last_pit + 1); It is better now,

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Angus Leeming a écrit : Ah... This is because I didn't go to the full monty... I forgot to erase those three lines: - advance(first, first_pit); - ParagraphList::const_iterator last = plist.begin(); - advance(last, last_pit + 1); It is

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > By the way, right now, there are multiple instances in the code where > operator[] access is used. Thus implying that we must present a position > type interface (vector alike). At the same time, like in the case above, > there are instances where

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> By the way, right now, there are multiple instances in the code >> where operator[] access is used. Thus implying that we must present >> a position type interface (vector alike). At

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-10 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> By the way, right now, there are multiple instances in the Abdelrazak> code where operator[] access is used. Thus implying that Abdelrazak> we must present a position type interface (vector alike). Abdelrazak> At the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Andre Poenitz a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: Helge == Helge Hafting [EMAIL PROTECTED] writes: Helge I tested the userguide, no problems there. Further testing Helge shows that it is related to images. I have some high resolution Helge images -

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Andre Poenitz a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: Helge == Helge Hafting [EMAIL PROTECTED] writes: Helge I tested the userguide, no problems there. Further testing Helge shows that it is related to images. I have some

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Hello Jean-Marc, maybe this is the bottleneck I am looking Abdelrazak for. With my patch, undo/redo paragraph insertion is Abdelrazak instantaneous and I can see that ParagraphList::insert Abdelrazak and/or erase are called.

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Martin Vermeer
On Thu, Feb 09, 2006 at 12:25:41PM +0100, Abdelrazak Younes wrote: Abdelrazak Younes a écrit : ... Again when pasting multiple paragraphs, my debug info tells me that the multiple insertion are instantaneous but I have to wait maybe 0.5 second to see them on the screen... Abdel.

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: This is what I was about to suggest: currently, every time a paragraph is created/killed, the whole document after it is duplicated. For images, this means a lot of work. In particular, I think a

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Hello Jean-Marc, maybe this is the bottleneck I am looking Abdelrazak for. With my patch, undo/redo paragraph insertion is Abdelrazak instantaneous and I can see that ParagraphList::insert

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Martin Vermeer a écrit : On Thu, Feb 09, 2006 at 12:25:41PM +0100, Abdelrazak Younes wrote: Abdelrazak Younes a écrit : ... Again when pasting multiple paragraphs, my debug info tells me that the multiple insertion are instantaneous but I have to wait maybe 0.5 second to see them on the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Abdelrazak Younes a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: This is what I was about to suggest: currently, every time a paragraph is created/killed, the whole document after it is

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Martin Vermeer a écrit : On Thu, Feb 09, 2006 at 12:25:41PM +0100, Abdelrazak Younes wrote: Abdelrazak Younes a écrit : ... Again when pasting multiple paragraphs, my debug info tells me that the multiple insertion are instantaneous but I have to wait maybe 0.5

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Abdelrazak Younes a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: This is what I was about to suggest: currently, every time a paragraph is created/killed, the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Jean-Marc Lasgouttes a écrit : Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Hello Jean-Marc, maybe this is the bottleneck I am looking Abdelrazak for. With my patch, undo/redo paragraph insertion is Abdelrazak instantaneous and I can see

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Abdelrazak Younes [EMAIL PROTECTED] writes: | I have put convenience function so as to minimize the changes needed | in the code that uses ParagraphList. But there are some minimal (IMHO) | change. The interface is simpler so a lot of code could be simplified | with this new class. By using a

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: But eraseIntern is only called when removing characters from a paragraph, right? Abdelrazak You are right of course. My use case is to type Enter in Abdelrazak the middle of the paragraph of a big document (Extended or Abdelrazak

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Lars Gullik Bjønnes a écrit : Abdelrazak Younes [EMAIL PROTECTED] writes: | I have put convenience function so as to minimize the changes needed | in the code that uses ParagraphList. But there are some minimal (IMHO) | change. The interface is simpler so a lot of code could be simplified |

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: IMHO first step is to make ParagraphList a proper class that _contains_ a (private) vector. Methods should be added to this ParagraphList so that what we use from the vector is covered. Nothing more. No tricks with using etc. should

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: But eraseIntern is only called when removing characters from a paragraph, right? Abdelrazak You are right of course. My use case is to type Enter in Abdelrazak the middle of the paragraph of a big

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak I don't remember! I cannot configure since the automake Abdelrazak changes plus I don't want to mess up my the Makefile that Abdelrazak I have modified for the qt4 frontend. A typical gcc call Abdelrazak is: Abdelrazak g++

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak The effect is the same for any paragraph inside Abdelrazak Extended.lyx, but it seems that I was mis leaded by my Abdelrazak debug info, sorry for the noise. Actually I think that it Abdelrazak is the instructions just after

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc Wouldn't it be simpler to use a vector and change its Jean-Marc interface to look like a vector? I am not sure why we want Jean-Marc a list, actually. Inserting/erasing in a vector of pointers Jean-Marc should be fast

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: IMHO first step is to make ParagraphList a proper class that _contains_ a (private) vector. Methods should be added to this ParagraphList so that what we use from the vector is covered. Nothing more. No

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc Wouldn't it be simpler to use a vector and change its Jean-Marc interface to look like a vector? I am not sure why we want Jean-Marc a list, actually. Inserting/erasing in a vector of pointers

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Abdelrazak Younes [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes a écrit : | Abdelrazak Younes [EMAIL PROTECTED] writes: | | I have put convenience function so as to minimize the changes | needed | | in the code that uses ParagraphList. But there are some minimal (IMHO) | | change. The

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : Abdelrazak Again when pasting multiple paragraphs, my debug info Abdelrazak tells me that the multiple insertion are instantaneous but Abdelrazak I have to wait maybe 0.5 second to see them on the Abdelrazak screen... Could it be updateCounters()? This scans the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Angus Leeming
Abdelrazak Younes wrote: This is why I had to write it++ instead of it+1 in some cases. Just browing an interesting thread. You're doing great things here Abdel! I highlighted the line above because language issues require less thought than a real code review ;-) ++it is generally preferable

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Angus Leeming a écrit : Abdelrazak Younes wrote: This is why I had to write it++ instead of it+1 in some cases. Just browing an interesting thread. You're doing great things here Abdel! Thanks. But I have to convince Lars... I highlighted the line above because language issues require

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
OK Lars, Why not going the other way? I can first provide a patch that will fix interface problems like for example the '++it' instead of 'it+1' but without touching ParagraphList. Then a second patch will introduce the new ParagraphList (the full dual vector/list one) that will provide the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Martin Vermeer
On Thu, Feb 09, 2006 at 05:16:10PM +0100, Abdelrazak Younes wrote: Jean-Marc Lasgouttes a écrit : Abdelrazak Again when pasting multiple paragraphs, my debug info Abdelrazak tells me that the multiple insertion are instantaneous but Abdelrazak I have to wait maybe 0.5 second to see them on the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Martin Vermeer a écrit : On Thu, Feb 09, 2006 at 05:16:10PM +0100, Abdelrazak Younes wrote: Jean-Marc Lasgouttes a écrit : Abdelrazak Again when pasting multiple paragraphs, my debug info Abdelrazak tells me that the multiple insertion are instantaneous but Abdelrazak I have to wait maybe 0.5

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Martin Vermeer a écrit : On Thu, Feb 09, 2006 at 05:16:10PM +0100, Abdelrazak Younes wrote: Jean-Marc Lasgouttes a écrit : Abdelrazak Again when pasting multiple paragraphs, my debug info Abdelrazak tells me that the multiple insertion are instantaneous but

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak As a side note, I don't really like this ParIterator class Abdelrazak and I think most of its use could be replaced by a simple Abdelrazak use of ParagraphList::iterator. But maybe it's just that I Abdelrazak don't understand

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Angus Leeming [EMAIL PROTECTED] writes: | Abdelrazak Younes wrote: | | This is why I had to write it++ instead of it+1 in some cases. | | Just browing an interesting thread. You're doing great things here Abdel! | | I highlighted the line above because language issues require less thought |

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Abdelrazak Younes [EMAIL PROTECTED] writes: | OK Lars, | | Why not going the other way? I can first provide a patch that will fix | interface problems like for example the '++it' instead of 'it+1' but | without touching ParagraphList. | Then a second patch will introduce the new ParagraphList

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 02:41:20PM +0100, Abdelrazak Younes wrote: I think this is because the member fontlist is a std::vectorFontTable and eraseIntern seems to be doing a lot of deletion. Would it make sense to apply the same strategy as ParagraphList? It should be as easy as templatify my

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 11:58:26AM +0100, Abdelrazak Younes wrote: Anyway, please find attached the patch. Everything but CutAndPaste (which crashes lyx) seems to work OK. But I didn't do extensive testing... sorry about that. If this is interesting to you, I'll try to find some time this

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Andre Poenitz [EMAIL PROTECTED] writes: | Use 100 or so for VECTOR_RESERVE _at max_. In fact, I do think | we should not reserve anything. agree. | I'd guess most of these functions should be inline in the header. Not in the beginning IMHO, it is easy to play with implementation when it is in

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Angus Leeming
Abdelrazak Younes [EMAIL PROTECTED] writes: I would be very happy if you could review my code. One thing I like about your code is that it makes the code of clients of ParagraphList a lot more readable. One place where this isn't the case is in undo.C where code like this suggests that you

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Angus Leeming [EMAIL PROTECTED] writes: | Incidentally, there are two main differences between the way Lars and | I review code: | 1. I'm less grumpy and more encouraging | 2. My opinion counts less than Lars' I'll go into non-grumpy-mode after 1.4.0 is released (and when I have this subversion

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Lars Gullik Bjønnes a écrit : Abdelrazak Younes [EMAIL PROTECTED] writes: | OK Lars, | | Why not going the other way? I can first provide a patch that will fix | interface problems like for example the '++it' instead of 'it+1' but | without touching ParagraphList. | Then a second patch will

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Andre Poenitz a écrit : -class ParagraphList : public std::vectorParagraph +using namespace std; Please no 'using' in headers. Sure, this was just a quickly made proof of concept. - ParagraphList::const_iterator p = par + 1; + ParagraphList::const_iterator p = par; p++; Or 'p

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Angus Leeming a écrit : Abdelrazak Younes [EMAIL PROTECTED] writes: I would be very happy if you could review my code. One thing I like about your code is that it makes the code of clients of ParagraphList a lot more readable. One place where this isn't the case is in undo.C where code like

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Angus Leeming
Abdelrazak Younes [EMAIL PROTECTED] writes: One thing I like about your code is that it makes the code of clients of ParagraphList a lot more readable. One place where this isn't the case is in undo.C where code like this suggests that you haven't yet hit on the perfect interface. ---

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Angus Leeming
Abdelrazak Younes [EMAIL PROTECTED] writes: +{ + bool result=true; + for (size_t i=start; iend; ++i) bool result = true; for (size_t i = start; i end; ++i) People are picky here ;-} That picky? Even pickier. A good idiom to follow in for loops is to use for

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Angus Leeming
Lars Gullik Bjønnes [EMAIL PROTECTED] writes: I'll go into non-grumpy-mode after 1.4.0 is released (and when I have this subversion thing up and going) At least I will do my best to. That'd be a shame. I quite enjoyed grumpy. Angus

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Andre Poenitz a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: "Helge" == Helge Hafting <[EMAIL PROTECTED]> writes: Helge> I tested the userguide, no problems there. Further testing Helge> shows that it is related to images. I have some high resolution Helge>

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Andre Poenitz a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: "Helge" == Helge Hafting <[EMAIL PROTECTED]> writes: Helge> I tested the userguide, no problems there. Further testing Helge> shows that it is related to images. I have

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Hello Jean-Marc, maybe this is the bottleneck I am looking Abdelrazak> for. With my patch, undo/redo paragraph insertion is Abdelrazak> instantaneous and I can see that ParagraphList::insert Abdelrazak> and/or erase

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Martin Vermeer
On Thu, Feb 09, 2006 at 12:25:41PM +0100, Abdelrazak Younes wrote: > Abdelrazak Younes a écrit : ... > Again when pasting multiple paragraphs, my debug info tells me that the > multiple insertion are instantaneous but I have to wait maybe 0.5 second > to see them on the screen... > > Abdel.

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: This is what I was about to suggest: currently, every time a paragraph is created/killed, the whole document after it is duplicated. For images, this means a lot of work. In particular, I think a

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Hello Jean-Marc, maybe this is the bottleneck I am looking Abdelrazak> for. With my patch, undo/redo paragraph insertion is Abdelrazak> instantaneous and I can see that

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Martin Vermeer a écrit : On Thu, Feb 09, 2006 at 12:25:41PM +0100, Abdelrazak Younes wrote: Abdelrazak Younes a écrit : ... Again when pasting multiple paragraphs, my debug info tells me that the multiple insertion are instantaneous but I have to wait maybe 0.5 second to see them on the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Abdelrazak Younes a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: > This is what I was about to suggest: currently, every time a > paragraph is created/killed, the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Martin Vermeer a écrit : On Thu, Feb 09, 2006 at 12:25:41PM +0100, Abdelrazak Younes wrote: Abdelrazak Younes a écrit : ... Again when pasting multiple paragraphs, my debug info tells me that the multiple insertion are instantaneous but I have to wait maybe 0.5

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Abdelrazak Younes a écrit : On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote: This is what I was about to suggest: currently, every time a paragraph is created/killed,

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Jean-Marc Lasgouttes a écrit : "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Hello Jean-Marc, maybe this is the bottleneck I am looking Abdelrazak> for. With my patch, undo/redo paragraph insertion is Abdelrazak> instantaneous and I can

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | I have put convenience function so as to minimize the changes needed | in the code that uses ParagraphList. But there are some minimal (IMHO) | change. The interface is simpler so a lot of code could be simplified | with this new class. By using a

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> But eraseIntern is only called when removing characters from a >> paragraph, right? Abdelrazak> You are right of course. My use case is to type "Enter" in Abdelrazak> the middle of the paragraph of a big document (Extended or

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Lars Gullik Bjønnes a écrit : Abdelrazak Younes <[EMAIL PROTECTED]> writes: | I have put convenience function so as to minimize the changes needed | in the code that uses ParagraphList. But there are some minimal (IMHO) | change. The interface is simpler so a lot of code could be simplified |

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> IMHO first step is to make ParagraphList a proper class that >> _contains_ a (private) vector. Methods should be added to this >> ParagraphList so that what we use from the vector is covered. >> Nothing more. No tricks with

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: But eraseIntern is only called when removing characters from a paragraph, right? Abdelrazak> You are right of course. My use case is to type "Enter" in Abdelrazak> the middle of the paragraph of a

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> I don't remember! I cannot configure since the automake Abdelrazak> changes plus I don't want to mess up my the Makefile that Abdelrazak> I have modified for the qt4 frontend. A typical gcc call Abdelrazak> is:

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> The effect is the same for any paragraph inside Abdelrazak> "Extended.lyx", but it seems that I was mis leaded by my Abdelrazak> debug info, sorry for the noise. Actually I think that it Abdelrazak> is the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: Jean-Marc> Wouldn't it be simpler to use a vector and change its Jean-Marc> interface to look like a vector? I am not sure why we want Jean-Marc> a list, actually. Inserting/erasing in a vector of pointers Jean-Marc> should be

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: IMHO first step is to make ParagraphList a proper class that _contains_ a (private) vector. Methods should be added to this ParagraphList so that what we use from the vector is covered. Nothing more.

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: Jean-Marc> Wouldn't it be simpler to use a vector and change its Jean-Marc> interface to look like a vector? I am not sure why we want Jean-Marc> a list, actually. Inserting/erasing in a vector of

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes a écrit : | > Abdelrazak Younes <[EMAIL PROTECTED]> writes: | > | I have put convenience function so as to minimize the changes | > needed | > | in the code that uses ParagraphList. But there are some minimal (IMHO) | > | change.

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : Abdelrazak> Again when pasting multiple paragraphs, my debug info Abdelrazak> tells me that the multiple insertion are instantaneous but Abdelrazak> I have to wait maybe 0.5 second to see them on the Abdelrazak> screen... Could it be updateCounters()? This scans

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Angus Leeming
Abdelrazak Younes wrote: > This is why I had to write "it++" instead of "it+1" in some cases. Just browing an interesting thread. You're doing great things here Abdel! I highlighted the line above because language issues require less thought than a real code review ;-) "++it" is generally

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Angus Leeming a écrit : Abdelrazak Younes wrote: This is why I had to write "it++" instead of "it+1" in some cases. Just browing an interesting thread. You're doing great things here Abdel! Thanks. But I have to convince Lars... I highlighted the line above because language issues

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
OK Lars, Why not going the other way? I can first provide a patch that will fix interface problems like for example the '++it' instead of 'it+1' but without touching ParagraphList. Then a second patch will introduce the new ParagraphList (the full dual vector/list one) that will provide the

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Martin Vermeer
On Thu, Feb 09, 2006 at 05:16:10PM +0100, Abdelrazak Younes wrote: > Jean-Marc Lasgouttes a écrit : > >Abdelrazak> Again when pasting multiple paragraphs, my debug info > >Abdelrazak> tells me that the multiple insertion are instantaneous but > >Abdelrazak> I have to wait maybe 0.5 second to see

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Martin Vermeer a écrit : On Thu, Feb 09, 2006 at 05:16:10PM +0100, Abdelrazak Younes wrote: Jean-Marc Lasgouttes a écrit : Abdelrazak> Again when pasting multiple paragraphs, my debug info Abdelrazak> tells me that the multiple insertion are instantaneous but Abdelrazak> I have to wait maybe

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Martin Vermeer a écrit : On Thu, Feb 09, 2006 at 05:16:10PM +0100, Abdelrazak Younes wrote: Jean-Marc Lasgouttes a écrit : Abdelrazak> Again when pasting multiple paragraphs, my debug info Abdelrazak> tells me that the multiple insertion are instantaneous but

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> As a side note, I don't really like this ParIterator class Abdelrazak> and I think most of its use could be replaced by a simple Abdelrazak> use of ParagraphList::iterator. But maybe it's just that I Abdelrazak> don't

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Abdelrazak Younes wrote: | | > This is why I had to write "it++" instead of "it+1" in some cases. | | Just browing an interesting thread. You're doing great things here Abdel! | | I highlighted the line above because language issues require less

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | OK Lars, | | Why not going the other way? I can first provide a patch that will fix | interface problems like for example the '++it' instead of 'it+1' but | without touching ParagraphList. | Then a second patch will introduce the new ParagraphList

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 02:41:20PM +0100, Abdelrazak Younes wrote: > I think this is because the member fontlist is a std::vector > and eraseIntern seems to be doing a lot of deletion. Would it make sense > to apply the same strategy as ParagraphList? It should be as easy as > "templatify" my

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Andre Poenitz
On Thu, Feb 09, 2006 at 11:58:26AM +0100, Abdelrazak Younes wrote: > Anyway, please find attached the patch. Everything but CutAndPaste > (which crashes lyx) seems to work OK. But I didn't do extensive > testing... sorry about that. If this is interesting to you, I'll try to > find some time

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | Use 100 or so for VECTOR_RESERVE _at max_. In fact, I do think | we should not reserve anything. agree. | I'd guess most of these functions should be inline in the header. Not in the beginning IMHO, it is easy to play with implementation when it is

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > I would be very happy if you could review my code. One thing I like about your code is that it makes the code of clients of ParagraphList a lot more readable. One place where this isn't the case is in undo.C where code like this suggests that you

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Incidentally, there are two main differences between the way Lars and | I review code: | 1. I'm less grumpy and more encouraging | 2. My opinion counts less than Lars' I'll go into non-grumpy-mode after 1.4.0 is released (and when I have this

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Lars Gullik Bjønnes a écrit : Abdelrazak Younes <[EMAIL PROTECTED]> writes: | OK Lars, | | Why not going the other way? I can first provide a patch that will fix | interface problems like for example the '++it' instead of 'it+1' but | without touching ParagraphList. | Then a second patch will

Re: 1.4cvs performance problem over network when adding a paragraph

2006-02-09 Thread Abdelrazak Younes
Andre Poenitz a écrit : -class ParagraphList : public std::vector +using namespace std; Please no 'using' in headers. Sure, this was just a quickly made proof of concept. - ParagraphList::const_iterator p = par + 1; + ParagraphList::const_iterator p = par; p++; Or 'p =

  1   2   >