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


Hey,

On Tue, Dec 30, 2014 at 1:50 PM, Jens Tröger <jens.troeger@light-speed.de>
wrote:

Connection is not the problem, I have already connected and that took
far less than a second on localhost.  The code in question is this:

    start_time = time.time()

    parenum = document.Text.createEnumeration()
    while parenum.hasMoreElements() :
        par = parenum.nextElement()

    end_time = time.time()
    print("Elapsed time: " + str(end_time - start_time))

Unless office attempts to connect "somewhere" (where to, anyway?) the
reason for the performance drop is elsewhere.  The above loop runs 1s on
my Mac, and 45s on Linux.  Other test documents show performance
difference of 3s (Mac) vs 3.45min (Linux).

If office would attempt (and time-out) to connect while iterating over
the paragraphs, the runtime would be _much_ worse.

Jens



You or we can now speculate for a long time or you can just start profiling
what is actually slow. Get a symbols build and run it with callgrind. You
can interpret the results with kcachegrind which will hopefully show what
took so much time and allow you to work on a fix.

Regards,
Markus

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.