Bug 77028 - Document load performance regression (4.1 -> 4.2)
Summary: Document load performance regression (4.1 -> 4.2)
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected) release
Hardware: All All
: medium major
Assignee: Not Assigned
Keywords: haveBacktrace
Depends on:
Reported: 2014-04-03 19:55 UTC by Horst Reiterer
Modified: 2015-06-08 14:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Test Document (Microsoft Powerpoint) (441.75 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2014-04-03 19:55 UTC, Horst Reiterer

Note You need to log in before you can comment on or make changes to this bug.
Description Horst Reiterer 2014-04-03 19:55:24 UTC
Created attachment 96874 [details]
Test Document (Microsoft Powerpoint)

We use LibreOffice for converting Microsoft Office and LibreOffice documents to PDF via UNO. After updating from 4.1.3 to 4.2.0, we noticed a substantially higher average conversion time (tested on Linux and Windows). I attached a document that illustrates the performance regression after updating:

Test Document: test.pptx:

In the interactive case, LibreOffice blocks during load, so the issue can be reproduced without using UNO. The increased load time is identical to what we experience when using UNO.           1.5s          39.7s  0.1s* (async load?, random crashes)

For easier timing, the issue can be reproduced via UNO using the DocumentLoader sample provided in the SDK. Change the path to the input file in the makefile before running the command.

  time make DocumentLoader.run

For this to work, LibreOffice must be started as follows:

/opt/libreoffice<major>.<minor>/program/soffice --nofirststartwizard --nologo --headless --norestore --invisible "--accept=socket,host=localhost,port=2083,tcpNoDelay=1;urp;"

With the 4.3 development build, the load returns within 0.1s. I assume that some loading action is now performed asynchronously because the whole PDF generation process (load and export) takes approximately the same amount of time as with

So it seems that the issue might have been fixed in a 4.3 development build. Can you confirm that? Are there plans to backport related changes?

The major catch in respect to 4.3 is, however, that LibreOffice crashes at random in case of the load and export sequence triggered via UNO (XComponentLoader::loadComponentFromURL, XStorable::storeToURL). The stack trace is as follows:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f918d7fb700 (LWP 12684)]
0x00007f91b0218151 in sfx2::sidebar::FocusManager::FocusDeckTitle() () from /opt/libreofficedev4.3/program/libsfxlo.so
(gdb) bt
#0  0x00007f91b0218151 in sfx2::sidebar::FocusManager::FocusDeckTitle() () from /opt/libreofficedev4.3/program/libsfxlo.so
#1  0x00007f91ae2a2a91 in Window::ImplGrabFocus(unsigned short) () from /opt/libreofficedev4.3/program/libvcllo.so
#2  0x00007f91ae2b1d72 in Window::~Window() () from /opt/libreofficedev4.3/program/libvcllo.so
#3  0x00007f91b0212879 in sfx2::sidebar::Deck::~Deck() () from /opt/libreofficedev4.3/program/libsfxlo.so
#4  0x00007f91b0201a08 in sfx2::sidebar::SidebarController::disposing() () from /opt/libreofficedev4.3/program/libsfxlo.so
#5  0x00007f91b0c545ef in cppu::WeakComponentImplHelperBase::dispose() () from /opt/libreofficedev4.3/program/../ure-link/lib/libuno_cppuhelpergcc3.so.3
#6  0x00007f91b01ff055 in sfx2::sidebar::SidebarDockingWindow::DoDispose() () from /opt/libreofficedev4.3/program/libsfxlo.so
#7  0x00007f91b01ff0d7 in sfx2::sidebar::SidebarDockingWindow::~SidebarDockingWindow() () from /opt/libreofficedev4.3/program/libsfxlo.so
#8  0x00007f91b01ff139 in sfx2::sidebar::SidebarDockingWindow::~SidebarDockingWindow() () from /opt/libreofficedev4.3/program/libsfxlo.so
#9  0x00007f91afff8a24 in SfxChildWindow::~SfxChildWindow() () from /opt/libreofficedev4.3/program/libsfxlo.so
#10 0x00007f91b01fef37 in sfx2::sidebar::SidebarChildWindow::~SidebarChildWindow() () from /opt/libreofficedev4.3/program/libsfxlo.so
#11 0x00007f91afff8bb9 in SfxChildWindow::Destroy() () from /opt/libreofficedev4.3/program/libsfxlo.so
#12 0x00007f91b003a14b in SfxWorkWindow::DeleteControllers_Impl() () from /opt/libreofficedev4.3/program/libsfxlo.so
#13 0x00007f91b0240330 in SfxFrame::DoClose_Impl() () from /opt/libreofficedev4.3/program/libsfxlo.so
#14 0x00007f91b025407c in SfxBaseController::dispose() () from /opt/libreofficedev4.3/program/libsfxlo.so
#15 0x00007f918c973015 in sd::DrawController::dispose() () from /opt/libreofficedev4.3/program/../program/libsdlo.so
#16 0x00007f919d70875a in (anonymous namespace)::Frame::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XCo                                           ntroller> const&) () from /opt/libreofficedev4.3/program/../program/libfwklo.so
#17 0x00007f919d7063ab in (anonymous namespace)::Frame::close(unsigned char) () from /opt/libreofficedev4.3/program/../program/libfwklo.so
#18 0x00007f91b0242588 in SfxFrame::DoClose() () from /opt/libreofficedev4.3/program/libsfxlo.so
#19 0x00007f91afbc114d in SfxBroadcaster::Broadcast(SfxHint const&) () from /opt/libreofficedev4.3/program/libsvllo.so
#20 0x00007f91b01a1890 in SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) () from /opt/libreofficedev4.3/program/libsfxlo.so
#21 0x00007f91b01baea4 in SfxBaseModel::close(unsigned char) () from /opt/libreofficedev4.3/program/libsfxlo.so
#22 0x00007f91a0adcaf6 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, unsigned int, double*, unsign                                           ed int) () from /opt/libreofficedev4.3/ure/lib/libgcc3_uno.so
#23 0x00007f91a0adbd5f in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, v                                           oid**, _uno_Any**) () from /opt/libreofficedev4.3/ure/lib/libgcc3_uno.so
#24 0x00007f91a0adc766 in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) ()
   from /opt/libreofficedev4.3/ure/lib/libgcc3_uno.so
#25 0x00007f919e6f697e in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const ()
   from /opt/libreofficedev4.3/ure/lib/libbinaryurplo.so
#26 0x00007f919e6f74ae in binaryurp::IncomingRequest::execute() const () from /opt/libreofficedev4.3/ure/lib/libbinaryurplo.so
#27 0x00007f919e6fb49d in request () from /opt/libreofficedev4.3/ure/lib/libbinaryurplo.so
#28 0x00007f91b0eef2a9 in cppu_threadpool::JobQueue::enter(long, bool) () from /opt/libreofficedev4.3/program/../ure-link/lib/libuno_cppu.so.3
#29 0x00007f91b0eef9ae in cppu_threadpool::ORequestThread::run() () from /opt/libreofficedev4.3/program/../ure-link/lib/libuno_cppu.so.3
#30 0x00007f91b0ef030a in threadFunc () from /opt/libreofficedev4.3/program/../ure-link/lib/libuno_cppu.so.3
#31 0x00007f91b174145f in osl_thread_start_Impl () from /opt/libreofficedev4.3/program/../ure-link/lib/libuno_sal.so.3
#32 0x00000036a56079d1 in start_thread () from /lib64/libpthread.so.0
#33 0x00000036a52e8b6d in clone () from /lib64/libc.so.6

Please let know if further information is required.
Comment 1 Julien Nabet 2014-04-04 05:58:24 UTC
Relevant code here:
    224 void FocusManager::FocusDeckTitle (void)
    225 {
    226     if (mpDeckTitleBar != NULL)
    227     {
    228         if (IsDeckTitleVisible())
    229         {
    230             mpDeckTitleBar->GrabFocus();
    231         }
    232         else if (mpDeckTitleBar->GetToolBox().GetItemCount() > 0)
    233         {
    234             ToolBox& rToolBox = mpDeckTitleBar->GetToolBox();
    235             rToolBox.GrabFocus();
    236             rToolBox.Invalidate();
    237         }
    238         else
    239             FocusPanel(0, false);
    240     }
    241     else
    242         FocusPanel(0, false);
    243 }

Just an hypothesis but perhaps mpDeckTitleBar->GetToolBox() should be checked against null.
I'll give it a try tonight.
Comment 2 Julien Nabet 2014-04-08 19:34:21 UTC
On pc Debian x86-64 with master sources updated yesterday, I could only try with this:
soffice "--accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"
since with 
soffice --nofirststartwizard --nologo --headless --norestore --invisible "--accept=socket,host=localhost,port=2083,tcpNoDelay=1;urp;"
I got:
warn:binaryurp:30232:6:binaryurp/source/reader.cxx:126: caught UNO exception 'acc_socket.cxx:SocketConnection::read: error - Succᅢᄄs'
warn:binaryurp:30232:6:binaryurp/source/bridge.cxx:866: undisposed bridge, potential deadlock ahead

So with first option, pptx opened, then I exported in pdf without crash.
Comment 3 Horst Reiterer 2014-08-03 19:36:54 UTC
Sehr geehrte Damen und Herren, ich bin derzeit nicht im Büro und werde am 05.08.2014 wieder erreichbar sein. Bitte beachten Sie, dass Ihre E-Mail nicht automatisch weitergeleitet wird. In dringenden Angelegenheiten wenden Sie sich bitte an Herrn Andreas Dangl (andreas.dangl@fabasoft.com), der mich in meiner Abwesenheit vertritt. Mit freundlichen Grüßen Horst Reiterer Dear Sir/Madam, I am currently out of the office and will be back on August 5th, 2014. Incoming e-mails will not be forwarded automatically. In case of urgency please contact Andreas Dangl (andreas.dangl@fabasoft.com). Yours sincerely Horst Reiterer
Comment 4 steve 2014-10-27 12:35:26 UTC
Is this bug still valid / reproducible with the latest LO release?

Please also try resetting your user profile and let us know if that helps: https://wiki.documentfoundation.org/UserProfile

Should this be still reproducible for you with the latest LO release please set this bug back to UNCONFIRMED. Should this issue be solved set it to WORKSFORME.

Setting to NEEDINFO until more detail is provided.
Comment 5 QA Administrators 2015-05-06 14:14:13 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INVALID
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team
Comment 6 QA Administrators 2015-06-08 14:26:47 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

-- The LibreOffice QA Team 

This INVALID Message was generated on: 2015-05-06

Warm Regards,
QA Team