On Jan 9, 2007, at 5:42 PM, Abdelrazak Younes wrote:

Georg Baum wrote:
This patch should work around that problem by using the system clipboard to store LyX formatted stuff. As a side effect, it also fixes this bug: http://bugzilla.lyx.org/show_bug.cgi?id=2138 ;-) Seriously: I started to implement this as a fix for 2138 over a year ago, but never found the time to finish it, because at that time it was far more complicated. When I realized that it could fix this problem as well (at a possible performance cost, we need to investigate that) I could not resist to try to finish it. Thanks to some cleanup that has happened during the last months it was now quite easy to get it working. This patch is not well tested and has a lot of debug output (+ some error handling missing), but if this is OK to go in I plan to polish it when I find time.

Quite frankly I am not very confident that you can achieve the same performance as the internal Clipboard. You are putting in the chain lyx2lyx parsing + lyx format parsing which is known to take some time. Right now, I can copy and paste the full UserGuide.lyx into another document without _any_ delay. I doubt this would ever be possible with your solution.

Moreover, we have now the multiple view feature so we don't need this feature anymore.

If we are going that route then I would prefer that you use binary dump of the internal structure instead.

Sorry for not being optimistic about this. Moreover I really think that the Clipboard/Selection stuff is OK right now for 1.5, the Mac problem can be cured without this hammer solution IMHO.

Well, it does work on Mac: insets and formatting are correctly cut- and-pasted within LyX (though cutting and pasting between LyX and other programs destroys the formatting and deletes the contents of insets, which I assume is intended behavior).

As for speed, I can cut a 110,000 word document in about 2 seconds and paste it in about 1 second with this patch. (Without the patch it's very quick -- < .25 second -- but, of course, without formatting or insets.)

Bennett

Reply via email to