[Libreoffice-bugs] [Bug 123173] Slow Start with many LanguagePacks/Dictionaries installed

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Sep 2 07:25:15 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=123173

--- Comment #13 from Stephan Bergmann <sbergman at redhat.com> ---
To measure the impact of reading all the *.xcd files under share/registry/
(whose number grows with the number of installed language packs) on start-up of
LibreOffice, I did the following:  With a (non-debug) local build of recent
LibreOffice master on Windows, including the patch

> diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
> index f7bd5ba34e3a..c64452f80a7e 100644
> --- a/configmgr/source/components.cxx
> +++ b/configmgr/source/components.cxx
> @@ -1,3 +1,4 @@
> +#include<iostream>
>  /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
>  /*
>   * This file is part of the LibreOffice project.
> @@ -497,7 +498,7 @@ Components::Components(
>          if (type == "xcsxcu") {
>              sal_uInt32 nStartTime = osl_getGlobalTimer();
>              parseXcsXcuLayer(layer, url);
> -            SAL_INFO("configmgr", "parseXcsXcuLayer() took " << (osl_getGlobalTimer() - nStartTime) << " ms");
> +            std::cerr<<"\nparseXcsXcuLayer() took " << (osl_getGlobalTimer() - nStartTime) << " ms\n";
>              layer += 2; //TODO: overflow
>          } else if (type == "bundledext") {
>              parseXcsXcuIniLayer(layer, url, false);
> @@ -521,7 +522,7 @@ Components::Components(
>          } else if (type == "res") {
>              sal_uInt32 nStartTime = osl_getGlobalTimer();
>              parseResLayer(layer, url);
> -            SAL_INFO("configmgr", "parseResLayer() took " << (osl_getGlobalTimer() - nStartTime) << " ms");
> +            std::cerr<<"\nparseResLayer() took " << (osl_getGlobalTimer() - nStartTime) << " ms\n";
>              ++layer; //TODO: overflow
>  #if ENABLE_DCONF
>          } else if (type == "dconf") {

to print timing information about reading (the two different bunches of) those
*.xcd files:

* A --with-lang=ALL build prints

> parseXcsXcuLayer() took 114 ms
> 
> parseResLayer() took 2586 ms

when running instdir/program/soffice.exe, and a crude stopwatch measurement
from start to showing the startcenter window takes 4.50 sec.

* A --with-lang=en-US build prints

> parseXcsXcuLayer() took 72 ms
> 
> parseResLayer() took 2 ms

when running instdir/program/soffice.exe, and a crude stopwatch measurement
from start to showing the startcenter window takes 1.55 sec.

So this reading of all *.xcd files indeed accounts for a measurable part of the
slowdown.  (Maybe more so than on e.g. Linux, as accessing many individual
files is purportedly slow on Windows.)

But in the context of the original comment 0, I see no room at least for
obvious, "low-hanging" improvement here, nor an indication that speeding up the
many-LanguagePacks scenario would also benefit the single-LanguagePack
scenario's start-up time.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200902/9d165508/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list