Richard Heck wrote:
Abdelrazak Younes wrote:
Richard Heck wrote:
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.
Should be easy to solve.
Can you fix this, Abdel?

I guess I can yes... I'll have a look. Even if I don't succeed to find a proper solution fast enough, the quick and dirty solution is just to remove the status check for this LFUN.

Abdel.

Reply via email to