Richard Heck wrote:
Abdelrazak Younes wrote:
I can't reproduce the selection problem (because I'm not on X11) but
could you please apply this patch and report if the slowness problem
still persist?
Unfortunately, that did not help. But here are some more things I've
found out.
First, the slowness is coming during the update of the standard toolbar,
in particular, during the update of the PASTE button, and more precisely
during the getStatus() call, and yet more precisely, during the
theClipboard().empty() check. So I did this:
bool GuiClipboard::empty() const
{
// We need to check both the plaintext and the LyX version of the
// clipboard. The plaintext version is empty if the LyX version
// contains only one inset, and the LyX version is empry if the
// clipboard does not come from LyX.
QTime t = QTime::currentTime();
bool b = !qApp->clipboard()->text(QClipboard::Clipboard).isEmpty();
lyxerr << "Checking emptiness took " << t.restart() << std::endl;
if (b)
return false;
return !hasLyXContents();
}
and I'm getting times on the order of 125ms just for that one call.
Bloody hell!
Good work Richard :-)
Should be easy to solve.
Abdel.