loader.loadComponentFromURL works slow when we are restoring CALC sheet from byte array | loader.loadComponentFromURL

Michael Meeks michael.meeks at suse.com
Wed Dec 5 04:42:34 PST 2012


Hi William,

On Tue, 2012-11-27 at 15:13 -0500, William Beltrán wrote:
> Hi, i have same problem here, I have to convert a Stream file calc to 
> excel file so i am using:

	Ok - sounds good - I assume you're using Java.

> desktop.loadComponentFromURL('private:stream', "_blank", 0, 
> self._toProperties(InputStream = inputStream))
> 
> but when file is big the time to work on this is up to 10 minutes!!
>
> Have you find a solution??

	Not sure if anyone helped you yet (sorry for the slow answer). The
basic punch-line is that the Java <-> C++ bridge is -incredibly- slow,
and as such if we start doing byte-by-byte reading across that interface
life can be horribly awful.

	So - in general it would be 1000ish times quicker to stream the file to
disk, and pass a URL to LibreOffice; that sounds like it should be
slower but ... really it will not be; and a short-duration tmp file is
unlikely to hit the disk but float in RAM (though check your permissions
to avoid security issues).

	HTH,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list