Am Samstag, 9. März 2013 um 10:24:49, schrieb Kornel Benko <[email protected]>
> Am Freitag, 8. März 2013 um 21:15:53, schrieb Richard Heck <[email protected]>
> > The branch, master, has been updated.
> > 
> > - Log -----------------------------------------------------------------
> > 
> > commit ecef54500d4d77baf4fa47eac2253679875ac08c
> > Author: Richard Heck <[email protected]>
> > Date:   Fri Mar 8 14:52:18 2013 -0500
> > 
> >     Introduce max_length parameter for plaintext() output routines,
> >     so we can write a limited amount when using this for TOC and
> >     tooltip output.
> >     
> >     This should solve the problem with slowness that Kornel noticed,
> >     which was caused by our trying to write an entire plaintext
> >     bibliography every time we updated the TOC. We did that because
> >     he had a bibliography inside a branch, and we use plaintext for
> >     creating the tooltip that goes with the branch list.
> >     
> 
> I curiously checked. But sorry, the slowness is back :(
> It feels even worse. Should I debug something?

I tried to debug. Each time I select a section from TOC (which implies editing 
another file)
there will be 3 calls to InsetBibtex::plaintext()

The first one backtraced is

#0  lyx::InsetBibtex::plaintext (this=0x2a1fbe0, os=..., max_length=180)
    at /usr/src/lyx/lyx-git/src/insets/InsetBibtex.cpp:934
#1  0x00000000009e65e1 in lyx::writePlaintextParagraph (buf=..., par=..., 
ods=..., runparams=..., 
    ref_printed=@0x7fffffff7baf: false, max_length=180)
    at /usr/src/lyx/lyx-git/src/output_plaintext.cpp:209
#2  0x0000000000d53c89 in lyx::InsetText::toolTipText (this=0x2a500d0, 
prefix=..., numlines=3, 
    len=60) at /usr/src/lyx/lyx-git/src/insets/InsetText.cpp:983
#3  0x0000000000d4c767 in lyx::InsetBranch::addToToc (this=0x2a500d0, cpit=..., 
    output_active=false) at /usr/src/lyx/lyx-git/src/insets/InsetBranch.cpp:359
#4  0x0000000000d53354 in lyx::InsetText::addToToc (this=0x2a29930, cdit=..., 
output_active=false)
    at /usr/src/lyx/lyx-git/src/insets/InsetText.cpp:841
#5  0x0000000000a33ee1 in lyx::TocBackend::update (this=0x29f04f8, 
output_active=false)
    at /usr/src/lyx/lyx-git/src/TocBackend.cpp:175

Notice, "output_active=false". This call is fast.

But the next two have
#0  lyx::InsetBibtex::plaintext (this=0x2a2e0d0, os=..., max_length=180)
    at /usr/src/lyx/lyx-git/src/insets/InsetBibtex.cpp:934
#1  0x00000000009e65e1 in lyx::writePlaintextParagraph (buf=..., par=..., 
ods=..., runparams=..., 
    ref_printed=@0x7fffffff82af: false, max_length=180)
    at /usr/src/lyx/lyx-git/src/output_plaintext.cpp:209
#2  0x0000000000d53c89 in lyx::InsetText::toolTipText (this=0x2a2d7e0, 
prefix=..., numlines=3, 
    len=60) at /usr/src/lyx/lyx-git/src/insets/InsetText.cpp:983
#3  0x0000000000d4c767 in lyx::InsetBranch::addToToc (this=0x2a2d7e0, cpit=..., 
    output_active=true) at /usr/src/lyx/lyx-git/src/insets/InsetBranch.cpp:359
#4  0x0000000000d53354 in lyx::InsetText::addToToc (this=0x22edbf0, cdit=..., 
output_active=true)
    at /usr/src/lyx/lyx-git/src/insets/InsetText.cpp:841
#5  0x0000000000a33ee1 in lyx::TocBackend::update (this=0x22720e8, 
output_active=true)
    at /usr/src/lyx/lyx-git/src/TocBackend.cpp:175
#6  0x0000000000957e67 in lyx::Buffer::updateBuffer (this=0x214f450, 
    scope=lyx::Buffer::UpdateMaster, utype=lyx::InternalUpdate)
    at /usr/src/lyx/lyx-git/src/Buffer.cpp:4259

And they are SLOW.

        Kornel


Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to