rgheck wrote:
If you change the code as I have and select some text with, say,
Shift-Down Arrow, and watch the times, the call
qApp->clipboard()->setText(emp, QClipboard::Selection);
can take as long as 125ms on one of my machines (roughly a 2GHz Athlon).
That is ridiculous.
Why is that ridiculous? If that happens once for every selection change,
125ms is not _that_ much. This is about accessing the X11 selection
which lies completely externally to LyX. I guess the exact figure will
depend on which server you are using. Of course you could optimize this
a bit by caching the selection state i.e. if there was already a
selection, don't tell the X11 server again that we have the selection.
What is particularly odd is that, how long it takes
depends upon whether the selection is within a single paragraph or
across a couple paragraphs. This is puzzling, since the actual call
never changes, but the time spent reliably does.
Are you sure that it is called as many times as the number of paragraph?
Abdel.