Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index



El 06/12/12 08:50, Michael Meeks escribió:
On Wed, 2012-12-05 at 11:27 -0500, William Beltrán wrote:
Ok, I try to be more specific
Warning: Any further replies that ignore my request to CC (this means
carbon-copy - it is usually the 2nd field down in your mailer after the
To: field) the public developers list - will be ignored. You need to
enter: libreoffice@lists.freedesktop.org into that CC field when you
reply: why ? I don't want to burn my time answering the same questions
again and again to lots of different users :-)

Ok.

I am usign aeroo_reports(aerolib) to generate a ods report, this
report is vey complex and it takes arround 20secs to work and generate
it in .ods type, I can configure the report_aeroo module to
automatically convert the result of my process to xls file but the
times grows up to 15 minutes!!! only in transformation process, so I
analize the module code and i found that this function is the problem:
        Fine.

  def putDocument(self, data):
         try:
             desktop =
self._context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", self._context)
         except UnknownPropertyException:
             self._context = self._resolver.resolve("uno:socket,host=%
s,port=%s;urp;StarOffice.ComponentContext" % (self._host, self._port))
             desktop =
self._context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", self._context)
         inputStream =
self.serviceManager.createInstanceWithContext("com.sun.star.io.SequenceInputStream", 
self.localContext)
         inputStream.initialize((uno.ByteSequence(data),))
        Looks like you convert some huge string into a byte sequence. I guess,
that should be reasonably quick. What does your huge string contain ?
zipped ODF ? flat-ODF ? what ?
Is the contain of the file (bytesequence), just like another odf file that really is a zip file as you knows.

         self.document = desktop.loadComponentFromURL('private:stream',
"_blank", 0,  self._toProperties(InputStream = inputStream))
         inputStream.closeInput()
        That takes the time ? if so - we'd need a profile of what is going on
to be able to point you at the slow bit so you can help fix it.

Where var data is an inputsream containing the bytes of the ods
file,but there is no problem until the line:

self.document = desktop.loadComponentFromURL('private:stream',
"_blank", 0,  self._toProperties(InputStream = inputStream))

This line is the "devil" so I have to waint until 15 minutes to be
done and excecute next line(inputStream.closeInput())
The reports has maybe has 4230 rows so its a big report
        4000 rows is not that many; there must be something unusual about them,
or about the SequenceInputStream: which looks like it should be really
fast. If you have a non-confidential example of the file-data there -
can you dump that to a file and try loading that standalone ?

        ATB,

                Michael.

If I open the file in LibreOffice and saves it as xls file that is very fast.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.