Re: Latest patch (Re: Mac speed, profiling)

2005-12-30 Thread Bennett Helm
On Dec 30, 2005, at 3:52 AM, Martin Vermeer wrote: Any noticble speed difference? Not for me... Bennett? I would be surprised if there were. Sorry ... I've been out of town and won't be able to get back to testing until Monday at the earliest. (But I see the issue is probably moot at thi

Re: Latest patch (Re: Mac speed, profiling)

2005-12-30 Thread Martin Vermeer
On Fri, Dec 30, 2005 at 06:05:09PM +0200, Martin Vermeer wrote: > On Fri, Dec 30, 2005 at 10:59:11AM +0100, Lars Gullik Bjønnes wrote: > > ... > > > So leave the bad ugly for now. > > Here's the result. I also put in Jean-Marc's request to make the > rowpainter construction conditional, althoug

Re: Latest patch (Re: Mac speed, profiling)

2005-12-30 Thread Martin Vermeer
On Fri, Dec 30, 2005 at 10:59:11AM +0100, Lars Gullik Bjønnes wrote: ... > So leave the bad ugly for now. Here's the result. I also put in Jean-Marc's request to make the rowpainter construction conditional, although I don't expect any noticable speed gain. But it's better practice. Attached.

Re: Latest patch (Re: Mac speed, profiling)

2005-12-30 Thread Martin Vermeer
On Fri, Dec 30, 2005 at 03:55:58PM +0100, Michael Gerz wrote: > Martin Vermeer wrote: > > >Attached, finally, the corrected version of the patch using crc32. Turns > >out y isn't needed here after all. > > > > > Just wondering: Is crc32 a suitable algorithm to build a signature (aka > hash value

Re: Latest patch (Re: Mac speed, profiling)

2005-12-30 Thread Michael Gerz
Martin Vermeer wrote: Attached, finally, the corrected version of the patch using crc32. Turns out y isn't needed here after all. Just wondering: Is crc32 a suitable algorithm to build a signature (aka hash value). Why don't we use one of famous hash algorithms? Michael

Re: Latest patch (Re: Mac speed, profiling)

2005-12-30 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | > lyx::size_type calculateRowSignature(Row const & row) | > { | > boost::crc_32_type crc; | > for (lyx::pos_type i = row.pos(); i < row.endpos(); ++i) { | > const unsigned char b[] = { par.getChar(i) }; | > crc.process_by

Re: Latest patch (Re: Mac speed, profiling)

2005-12-30 Thread Martin Vermeer
On Fri, Dec 30, 2005 at 12:00:13AM +0100, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > | Attached, finally, the corrected version of the patch using crc32. Turns > | out y isn't needed here after all. > > Any noticble speed difference? Not for me... Bennett? I woul

Re: Latest patch (Re: Mac speed, profiling)

2005-12-29 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | Attached, finally, the corrected version of the patch using crc32. Turns | out y isn't needed here after all. Any noticble speed difference? | Index: rowpainter.C | === | RCS file: /usr/l

Latest patch (Re: Mac speed, profiling)

2005-12-29 Thread Martin Vermeer
On Thu, Dec 22, 2005 at 06:23:26PM +0100, Jean-Marc Lasgouttes wrote: > > "David" == David Green <[EMAIL PROTECTED]> writes: > > David> On 12/22/05 7:41 AM, "Jean-Marc Lasgouttes" > David> <[EMAIL PROTECTED]> > David> wrote: > > >>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: >

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-23 Thread Andre Poenitz
On Fri, Dec 23, 2005 at 10:40:45AM +0100, Jean-Marc Lasgouttes wrote: > So for now, I suspect that something simple will be enough. Just count the insets as a single char and be done until somebody comes up with a new problematic case. Andre'

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-23 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Jean-Marc Lasgouttes wrote: >> Concerning the signature, we should leverage boost::crc32. Two >> ideas of text to compute against: >> >> - the easy one: take the text of the row (including META_INSET >> characters) as a string to c

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > Angus Leeming writes: > > | Jean-Marc Lasgouttes wrote: > | > Concerning the signature, we should leverage boost::crc32. Two ideas > | > of text to compute against: > | > > | > - the easy one: take the text of the row (including META_INSET > | > characters) as a str

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Jean-Marc Lasgouttes wrote: | > Concerning the signature, we should leverage boost::crc32. Two ideas | > of text to compute against: | > | > - the easy one: take the text of the row (including META_INSET | > characters) as a string to compute the crc

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: > Concerning the signature, we should leverage boost::crc32. Two ideas > of text to compute against: > > - the easy one: take the text of the row (including META_INSET > characters) as a string to compute the crc on, and add the y > information somehow (we could may

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Jean-Marc Lasgouttes
> "David" == David Green <[EMAIL PROTECTED]> writes: David> On 12/22/05 7:41 AM, "Jean-Marc Lasgouttes" David> <[EMAIL PROTECTED]> David> wrote: >>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: >> Martin> Is crc32 invariant for character transposition? >> Sure. David> Erm, crc

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread David Green
On 12/22/05 7:41 AM, "Jean-Marc Lasgouttes" <[EMAIL PROTECTED]> wrote: >> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Is crc32 invariant for character transposition? > > Sure. Erm, crc32 should produce a different result when characters are transposed. Dave

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Is crc32 invariant for character transposition? Sure. Martin> Or use the width of the whole row. *Very* likely to change if Martin> the inset gets written into (OK, not perfect) Or keep the complete Row/RowMetrics object inste

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Bennett Helm
On Dec 21, 2005, at 3:24 PM, Martin Vermeer wrote: BTW I did manage to extend the patch to include text inside insets. Attached. You will see that there are still some rendering 'warts', but I live in hope. The logic seems to be correct. Please let me know if you get the intended speed-up, a

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Martin Vermeer
On Thu, 2005-12-22 at 12:48 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Jean-Marc, I think it is safe to assume that we do not want > Martin> *this* in 1.4.0... what about the limited patch, with a better > Martin> signature? > > Y

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Jean-Marc, I think it is safe to assume that we do not want Martin> *this* in 1.4.0... what about the limited patch, with a better Martin> signature? Yes, it looks a bit too complicated for now :) I think singlerow4+fixes+signa

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-22 Thread Martin Vermeer
On Thu, 2005-12-22 at 08:24 +0200, Martin Vermeer wrote: > On Wed, Dec 21, 2005 at 10:24:33PM +0200, Martin Vermeer wrote: > > On Wed, Dec 21, 2005 at 01:46:53PM -0500, Bennett Helm wrote: > > > On Dec 21, 2005, at 9:01 AM, Bennett Helm wrote: > > ... > > > BTW I did manage to extend the patch t

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-21 Thread Martin Vermeer
On Wed, Dec 21, 2005 at 10:24:33PM +0200, Martin Vermeer wrote: > On Wed, Dec 21, 2005 at 01:46:53PM -0500, Bennett Helm wrote: > > On Dec 21, 2005, at 9:01 AM, Bennett Helm wrote: ... > BTW I did manage to extend the patch to include text inside insets. > Attached. You will see that there are s

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-21 Thread Helge Hafting
On Wed, Dec 21, 2005 at 10:24:33PM +0200, Martin Vermeer wrote: > On Wed, Dec 21, 2005 at 01:46:53PM -0500, Bennett Helm wrote: > > On Dec 21, 2005, at 9:01 AM, Bennett Helm wrote: > > > > >I haven't noticed any strange drawing issues. > > > > I take that back. On occasion, when typing text into

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-21 Thread Angus Leeming
Martin Vermeer wrote: > A good signature has the following properties: > > 1) it _never_ changes when the row does not change. (e.g., not when you > add characters above it in the paragraph.) > 2) it _always_ changes when the row changes. On this, the current > signature is weak. > > The best sig

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-21 Thread Martin Vermeer
On Wed, Dec 21, 2005 at 01:46:53PM -0500, Bennett Helm wrote: > On Dec 21, 2005, at 9:01 AM, Bennett Helm wrote: > > >I haven't noticed any strange drawing issues. > > I take that back. On occasion, when typing text into the middle of a > paragraph should result in the last word of that line be

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-21 Thread Bennett Helm
On Dec 21, 2005, at 9:01 AM, Bennett Helm wrote: I haven't noticed any strange drawing issues. I take that back. On occasion, when typing text into the middle of a paragraph should result in the last word of that line being bumped to the next line, it doesn't happen on screen, even though

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-21 Thread Bennett Helm
On Dec 21, 2005, at 5:11 AM, Jean-Marc Lasgouttes wrote: Martin> Hmmm... do you still think I should give it a try for 1.4.0? I Martin> expect it to require major reconstructive surgery, and still Martin> not work reliably. Let's see what Bennett's testing says. I suspect that your current patc

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-21 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Now, if we have a selection, you also have to split up the Martin> drawSelection routine into row-by-row pieces. E.g., write a Martin> paintSelection method in rowpainter.C. Undoubtedly doable, but Martin> IMHO not for 1.4.0. M

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-20 Thread Martin Vermeer
On Tue, Dec 20, 2005 at 03:37:30PM +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Ah, I see what it is. Two humble brackets: > > Indeed it helps a lot:) The patch seems to work well AFAICS. What > would be nice is to extend it to work

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-20 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> On Dec 18, 2005, at 6:17 AM, Martin Vermeer wrote: >> I did try map in the way Angus proposed, it works and is cleaner >> than vector. (I don't know, and don't really care, if it is faster. >> Not critical.) >> >> Attached. >>

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-20 Thread Bennett Helm
On Dec 18, 2005, at 6:17 AM, Martin Vermeer wrote: I did try map in the way Angus proposed, it works and is cleaner than vector. (I don't know, and don't really care, if it is faster. Not critical.) Attached. - Martin This version won't compile for me: Making all in mathed make all-am sou

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-20 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Ah, I see what it is. Two humble brackets: Indeed it helps a lot:) The patch seems to work well AFAICS. What would be nice is to extend it to work also when selecting: this is an operation that feels quite slow with LyX IMO. Al

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-19 Thread Martin Vermeer
On Mon, Dec 19, 2005 at 05:00:17PM +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> I did try map in the way Angus proposed, it works and is > Martin> cleaner than vector. (I don't know, and don't really care, if > Martin> it is faster.

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-19 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> I did try map in the way Angus proposed, it works and is Martin> cleaner than vector. (I don't know, and don't really care, if Martin> it is faster. Not critical.) I cannot say I am lucky with this patch :) First test: insert a

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-18 Thread Andre Poenitz
On Sat, Dec 17, 2005 at 06:11:27PM +0200, Martin Vermeer wrote: > > (and would lessen the work of getting the rowList moved out of the > > paragraph). > > Was that the plan? Long term, yes. The rowlist is view-specific information and thus conceptionally wrong in the paragraph. > Sounds a bit am

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-18 Thread Andre Poenitz
On Sun, Dec 18, 2005 at 11:44:05AM +0200, Martin Vermeer wrote: > On Sat, Dec 17, 2005 at 06:57:33PM +, Angus Leeming wrote: > > > Why not try > > std::map rowSignature; > > which I'd imagine will actually be easier to use than your vector in this > > regard and will remove the "implicit c

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-18 Thread Andre Poenitz
On Sat, Dec 17, 2005 at 07:58:42PM +0200, Martin Vermeer wrote: > 2) BTW is it really true that pushing something to the > back of a (or other container), forcing a copy in memory to a > new location (?) will invalidate any iterators defined earlier to point > into it? This feels almost like assem

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-18 Thread Martin Vermeer
On Sun, Dec 18, 2005 at 01:05:57PM +0100, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > | I did try map in the way Angus proposed, it works and is cleaner than > | vector. (I don't know, and don't really care, if it is faster. Not > | critical.) > > A the vector will

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-18 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | I did try map in the way Angus proposed, it works and is cleaner than | vector. (I don't know, and don't really care, if it is faster. Not | critical.) A the vector will have O(1) lookup, the map O(log n). | Index: rowpainter.C | =

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-18 Thread Martin Vermeer
On Sun, Dec 18, 2005 at 10:59:36AM +0100, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > | On Sat, Dec 17, 2005 at 06:57:33PM +, Angus Leeming wrote: > | > | > Why not try > | > std::map rowSignature; > | > which I'd imagine will actually be easier to use than

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-18 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | On Sat, Dec 17, 2005 at 06:57:33PM +, Angus Leeming wrote: | | > Why not try | > std::map rowSignature; | > which I'd imagine will actually be easier to use than your vector in this | > regard and will remove the "implicit connection" that Lars

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-18 Thread Martin Vermeer
On Sat, Dec 17, 2005 at 06:57:33PM +, Angus Leeming wrote: > Why not try > std::map rowSignature; > which I'd imagine will actually be easier to use than your vector in this > regard and will remove the "implicit connection" that Lars is worried > about. Hmmm, appears to be doable. More

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-17 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | 3) Oops... this patch lacks | | /// | typedef std::vector RowSignature; | | which I put in RowList_fwd.h... correct? Or in paragraph ... does not seem to make much of a difference as long as rowSignature itself is there. | + if (rsit ==

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-17 Thread Angus Leeming
Martin Vermeer wrote: > 2) BTW is it really true that pushing something to the > back of a (or other container), forcing a copy in memory to a > new location (?) will invalidate any iterators defined earlier to point > into it? This feels almost like assembly :-( Yes, it's true. insert() and eras

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-17 Thread Martin Vermeer
On Sat, Dec 17, 2005 at 05:23:35PM +0100, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: ... > | > but what are the indices in this vector... there seems to be an > | > implicit connection here that is not obvious? > | > | Yes... the row iterator counts in paralle

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-17 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | > I still prefere the rowSignature_ style though. | | Shall I change it to that? I'd like that. [...] | > but what are the indices in this vector... there seems to be an | > implicit connection here that is not obvious? | | Yes... the row iter

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-17 Thread Martin Vermeer
On Sat, Dec 17, 2005 at 03:50:17PM +0100, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > This patch looks pretty good to me. > > Let's get some testing done before we commit though... Hear, hear. > | @@ -391,7 +391,9 @@ public: > | RowList & rows() { return r

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-17 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: This patch looks pretty good to me. Let's get some testing done before we commit though... | Index: paragraph.C | === | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v | retri

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Martin Vermeer
On Fri, Dec 16, 2005 at 08:20:57PM +0100, Georg Baum wrote: > Martin Vermeer wrote: > > > On Fri, Dec 16, 2005 at 07:16:51PM +0100, Juergen Spitzmueller wrote: > >> Martin Vermeer wrote: > >> > BTW do you know of an easy way to test whether the cursor is in a given > >> > lyxtext? I would need tha

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Georg Baum
Martin Vermeer wrote: > On Fri, Dec 16, 2005 at 07:16:51PM +0100, Juergen Spitzmueller wrote: >> Martin Vermeer wrote: >> > BTW do you know of an easy way to test whether the cursor is in a given >> > lyxtext? I would need that later on. >> >> Maybe DocIterator::text() > > And how do you compare

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Martin Vermeer
On Fri, Dec 16, 2005 at 07:16:51PM +0100, Juergen Spitzmueller wrote: > Martin Vermeer wrote: > > BTW do you know of an easy way to test whether the cursor is in a given > > lyxtext? I would need that later on. > > Maybe DocIterator::text() And how do you compare (==) the current text (paintPar a

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Juergen Spitzmueller
Martin Vermeer wrote: > BTW do you know of an easy way to test whether the cursor is in a given > lyxtext? I would need that later on. Maybe DocIterator::text() Jürgen

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Martin Vermeer
On Fri, Dec 16, 2005 at 04:36:15PM +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > Then, what could be done is have redoParagraph keep the old list (in a > oldrows struct) and for each new row created set a 'clean' flag if it > is identical to

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Martin Vermeer
On Fri, Dec 16, 2005 at 10:52:59AM -0500, Bennett Helm wrote: > On Dec 16, 2005, at 10:08 AM, Martin Vermeer wrote: > > >Improved patch attached. > > > >- Martin > > > > > > This new patch refuses to compile: > > ../../src/paragraph.h:395: error: could not convert `this- > >Paragraph::row_sig_'

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Bennett Helm
On Dec 16, 2005, at 10:08 AM, Martin Vermeer wrote: Improved patch attached. - Martin This new patch refuses to compile: Making all in mathed make all-am source='math_casesinset.C' object='math_casesinset.lo' libtool=yes \ depfile='.deps/math_casesinset.Plo' tmpdepfile='.deps/ math_cases

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Angus Leeming
Martin Vermeer wrote: > Improved patch attached. size() has type std::vector::size_type which is *not* the same as unsigned on 64 bit machines. Please use lyx::size_type here too. + unsigned rowno = 0; ... + if (rowno >= par.row_sig().size()) Great work! -- Angus

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: >> Also, I do not like much the fact that these signatures are stored >> in Paragraph. Why can't they go in rows themselves? Martin> Tried that... unfortunately every time redoParagraph clears Martin> all row data. First I missed earli

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> It's much faster -- 20 seconds down to 8-9 seconds for a Bennett> sentence that takes me 7-8 seconds to type. (And that's with Bennett> debugging turned on.) What debugging? --enable-debug should not slow down, only --enable-std

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Helge Hafting
Martin Vermeer wrote: On Wed, 2005-12-14 at 10:59 -0500, Bennett Helm wrote: On Dec 14, 2005, at 10:51 AM, Jean-Marc Lasgouttes wrote: "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Do I read top-down correctly as saying that one half of all Angus> LyX's

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Martin Vermeer
On Fri, 2005-12-16 at 12:04 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> So I gave it another try... see attached. This is essentially > Martin> based upon the 'row signature' approach mentioned by Jean-Marc > Martin> in a later post

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Bennett Helm
On Dec 16, 2005, at 4:23 AM, Martin Vermeer wrote: So Bennett, if I may bother you once again to test this for a huge paragraph _not inside an inset_. No bother at all If it works, I will extend it for insets, and the patch can then be included with the Mac binaries to be published, if a

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Angus Leeming
> So I gave it another try... see attached. This is essentially based upon > the 'row signature' approach mentioned by Jean-Marc in a later post. The logic seems reasonable to me, but you're far more expert at that than I am. Some small niggles with the code: You'll get complaints here on 64bit m

Re: [Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> So I gave it another try... see attached. This is essentially Martin> based upon the 'row signature' approach mentioned by Jean-Marc Martin> in a later post. Looks good, but I suspect the row signature you use is not strong enou

[Patch] Re: [patch] Re: Mac speed, profiling

2005-12-16 Thread Martin Vermeer
On Wed, 2005-12-14 at 10:59 -0500, Bennett Helm wrote: > On Dec 14, 2005, at 10:51 AM, Jean-Marc Lasgouttes wrote: > > >> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > > > Angus> Do I read top-down correctly as saying that one half of all > > Angus> LyX's processing time is spent in

Re: [patch] Re: Mac speed, profiling

2005-12-15 Thread Martin Vermeer
On Thu, 2005-12-15 at 10:31 +, Angus Leeming wrote: > Martin Vermeer wrote: > >> One idea I had is to do some checksumming of the row content while > >> breaking paragraphs which allows to know whether a row has been > >> modified and needs a redraw. Then the rowpainter could more safely > >> d

Re: [patch] Re: Mac speed, profiling

2005-12-15 Thread Angus Leeming
Martin Vermeer wrote: >> One idea I had is to do some checksumming of the row content while >> breaking paragraphs which allows to know whether a row has been >> modified and needs a redraw. Then the rowpainter could more safely >> decide not to redraw some parts. I do not know how difficult this >

Re: [patch] Re: Mac speed, profiling

2005-12-15 Thread Martin Vermeer
On Thu, 2005-12-15 at 10:35 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> I still want to give that a try later, for 1.4.1 perhaps... > Martin> there must be a straightforward way of doing it, mostly > Martin> confined to rowpainter.

Re: [patch] Re: Mac speed, profiling

2005-12-15 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> I still want to give that a try later, for 1.4.1 perhaps... Martin> there must be a straightforward way of doing it, mostly Martin> confined to rowpainter. And with special attention to the text Martin> inside insets, as people w

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Martin Vermeer
On Wed, Dec 14, 2005 at 05:03:12PM +0100, Jean-Marc Lasgouttes wrote: > > "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: > > Bennett> On Dec 14, 2005, at 10:51 AM, Jean-Marc Lasgouttes wrote: > >>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > >> > Angus> Do I read top-down

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> On Dec 14, 2005, at 10:51 AM, Jean-Marc Lasgouttes wrote: >>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: >> Angus> Do I read top-down correctly as saying that one half of all Angus> LyX's processing time is spent in

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Bennett Helm
On Dec 14, 2005, at 10:51 AM, Jean-Marc Lasgouttes wrote: "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Do I read top-down correctly as saying that one half of all Angus> LyX's processing time is spent in doTextTask? Yes, drawing seems to be very slow with Qt/Mac. But this doe

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Do I read top-down correctly as saying that one half of all Angus> LyX's processing time is spent in doTextTask? Yes, drawing seems to be very slow with Qt/Mac. JMarc

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> And you say nothing while I make a fool of myself? Nice. :) At that time Bennett felt removing the cache was slightly slower, so I wondered whether the Qt/Mac cache was efficient enough. JMarc

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> I've posted a new profile Bennett> () Bennett> that took longer: I typed for about 1 minute, waited for LyX Bennett> to catch up, and stopped profiling. The drawin

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Angus Leeming
Bennett Helm wrote: > On Dec 14, 2005, at 6:26 AM, Jean-Marc Lasgouttes wrote: > >> BTW Bennett, for the next Shark profile, it would be nice to have >> counts in addition to time %. > > I don't see how to get both counts and time %, but I've posted a new > profile with counts. Just in case it's

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: >> The bottom up version is intriguing. I am not sure I know how to >> use it. Bennett> I take it you mean "top down": I've been giving you bottom-up Bennett> previously (since that's Shark's default). Hmm, shark-profile-2.txt looks top

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Martin Vermeer
On Wed, 2005-12-14 at 15:26 +0100, Jean-Marc Lasgouttes wrote: > > "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: > > Bennett> On Dec 14, 2005, at 6:26 AM, Jean-Marc Lasgouttes wrote: > >> BTW Bennett, for the next Shark profile, it would be nice to have > >> counts in addition to time

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Martin Vermeer
On Wed, 2005-12-14 at 15:54 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > >> That seems to be within margin of error. > > Martin> What this means is that the Mac Qt version does internal > Martin> caching as well. As it should. Doesn't expla

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Bennett Helm
On Dec 14, 2005, at 9:26 AM, Jean-Marc Lasgouttes wrote: "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> On Dec 14, 2005, at 6:26 AM, Jean-Marc Lasgouttes wrote: BTW Bennett, for the next Shark profile, it would be nice to have counts in addition to time %. Bennett> I don't s

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: >> That seems to be within margin of error. Martin> What this means is that the Mac Qt version does internal Martin> caching as well. As it should. Doesn't explain the slowness. Mind you, I actually read the Qt/Mac code before deciding

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Martin Vermeer
On Wed, 2005-12-14 at 09:27 -0500, Bennett Helm wrote: > On Dec 14, 2005, at 8:42 AM, Jean-Marc Lasgouttes wrote: > > >> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > > > Martin> Looking at qfont_loader.C, I see that there was font width > > Martin> caching for, as it says, > > >

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Bennett Helm
On Dec 14, 2005, at 8:42 AM, Jean-Marc Lasgouttes wrote: "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Looking at qfont_loader.C, I see that there was font width Martin> caching for, as it says, Martin> "// Starting with version 3.1.0, Qt/X11 does its own caching Martin> of /

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> On Dec 14, 2005, at 6:26 AM, Jean-Marc Lasgouttes wrote: >> BTW Bennett, for the next Shark profile, it would be nice to have >> counts in addition to time %. Bennett> I don't see how to get both counts and time %, but I've Benn

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Looking at qfont_loader.C, I see that there was font width Martin> caching for, as it says, Martin> "// Starting with version 3.1.0, Qt/X11 does its own caching Martin> of // character width, so it is not necessary to provide Ma

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Bennett Helm
On Dec 14, 2005, at 6:26 AM, Jean-Marc Lasgouttes wrote: BTW Bennett, for the next Shark profile, it would be nice to have counts in addition to time %. I don't see how to get both counts and time %, but I've posted a new profile with counts. Just in case it's helpful, I posted both a bott

Re: [patch] Re: Mac speed, profiling

2005-12-14 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: >> It is done in setCursor, maybe Alfredo knows why? Martin> First off, I commented out the redoParagraph statement in Martin> setTargetX, and LyX started crashing on backspace. It seems to Martin> be needed... Too bad :) Martin> Do

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Martin Vermeer
On Tue, Dec 13, 2005 at 06:08:52PM +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > Martin> The width querying is mostly from redoParagraph too, I > Martin> suspect. > > It seems that the rows we build at this point should remember the > positio

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Martin Vermeer
On Tue, Dec 13, 2005 at 06:08:52PM +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Ah yes of course. Is there a way to suppress this? What I see > Martin> is that always another call to redoParagraph seems to follow, > Martin> from Buff

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Bennett Helm
On Dec 13, 2005, at 9:45 AM, Jean-Marc Lasgouttes wrote: It would be nice too to have a completely developed shark tree (so that we can see what happens in places other than text painting). OK -- I think I've done it properly this time. You can get it here:

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Ah yes of course. Is there a way to suppress this? What I see Martin> is that always another call to redoParagraph seems to follow, Martin> from BufferView::Pimpl::metrics. My feeling is that one of Martin> them is superfluous.

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Martin Vermeer
On Tue, 2005-12-13 at 17:03 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > >> TransManager::TranslateAndInsert(char, LyXText*) (lyx) > > Martin> The last one is fascinating. Inside the code it says: > > Note that this part of the tree is col

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: >> TransManager::TranslateAndInsert(char, LyXText*) (lyx) Martin> The last one is fascinating. Inside the code it says: Note that this part of the tree is collapsed. Probably TranslateAndInsert triggers lots of other things. Actually,

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> On Dec 13, 2005, at 5:04 AM, Jean-Marc Lasgouttes wrote: >> Bennett, as I wrote before, a Shark output on a binary compiled >> _without_ profile information (and a Qt without profile >> information) would give a better idea of wh

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Bennett Helm
On Dec 13, 2005, at 5:04 AM, Jean-Marc Lasgouttes wrote: Bennett, as I wrote before, a Shark output on a binary compiled _without_ profile information (and a Qt without profile information) would give a better idea of what happens. I'm compiling now, but just to be sure (since it'll take a few

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | I say we have a good hard look at TransManager::TranslateAndInsert | now :-) I say we wait. -- Lgb

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Martin Vermeer
On Tue, 2005-12-13 at 11:04 +0100, Jean-Marc Lasgouttes wrote: > > "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: > > Bennett> Finally, I applied the patch to the version of lyx compiled > Bennett> with gcc-3.3 with profiling info, ran Shark (in the same way > Bennett> I did before), a

Re: [patch] Re: Mac speed, profiling

2005-12-13 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> Finally, I applied the patch to the version of lyx compiled Bennett> with gcc-3.3 with profiling info, ran Shark (in the same way Bennett> I did before), and placed the report here: Bennett> benn

Re: [patch] Re: Mac speed, profiling

2005-12-12 Thread Jean-Marc Lasgouttes
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> It seems to be. (I'm swamped today, but I'll investigate more Bennett> carefully -- and provide a new Shark profile -- when I can.) Please provide a shark profile of a binary not configured with profiling enabled. (although I di

Re: [patch] Re: Mac speed, profiling

2005-12-12 Thread Bennett Helm
On Dec 9, 2005, at 5:25 PM, Martin Vermeer wrote: Quote: "Done. I opened lyx, opened a file with a long paragraph in an Bennett> inset, typed a sentence in the middle of that paragraph (and Bennett> waited until the screen caught up), and then quit." Is this what you did in all these tests?

Re: [patch] Re: Mac speed, profiling

2005-12-12 Thread Martin Vermeer
On Fri, 2005-12-09 at 16:07 -0500, Bennett Helm wrote: > On Dec 9, 2005, at 3:03 PM, Martin Vermeer wrote: > > > On Thu, Dec 08, 2005 at 12:31:40PM -0500, Bennett Helm wrote: ... > > Bennett, > > > > the attached should produce a noticable speedup. > > > > (Lars likes simple patches :) > > Well

  1   2   >