https://bugs.freedesktop.org/show_bug.cgi?id=59772

--- Comment #5 from Vincent Povirk <[email protected]> ---
Copying text and an image on Windows (to, for example, wordpad) will hang
LibreOffice for the duration of the conversion, so it can be observed that way
without involving Wine.

It does appear to be O(n), in that if I make a picture 3 times as large or copy
3 times as many images, it takes 3 times as long to convert.

The best argument I can find that something is wrong is that copying the image
by itself is 10 times faster than copying text and the image. Writer copies
images by themselves in BMP format, while in the RTF it writes hex-encoded JPEG
data. Converting to JPEG and then encoding that to hex probably takes some
time, but AFAICT there's no need for Writer to be doing this. Based on the RTF
spec it seems entirely possible to use raw BMP data.

Word 2003 uses hex-encoded PNG data, and it seems to be about 4 times faster
(but I can't measure it in quite the same way because it does the conversion
immediately when the data is copied, and if it did not it would most likely
trigger a similar bug).

So, maybe most of the time is taken by the encode to JPEG, but I would argue
that for clipboard operations you should choose a method that is fast at the
cost of compression. Maybe BMP is too large, but I can't think of a reason it
would be good enough for copying images on their own and not images in rtf.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to