Bug Hunting Session
Bug 66524 - LibreOffice 410rc1 start time regression vs. 3.6.6/4.0.4
Summary: LibreOffice 410rc1 start time regression vs. 3.6.6/4.0.4
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1.0.1 rc
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.2.0 target:4.1.0
Keywords:
Depends on:
Blocks: mab4.1
  Show dependency treegraph
 
Reported: 2013-07-02 22:05 UTC by Cor Nouws
Modified: 2013-07-23 16:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2013-07-02 22:05:14 UTC
Hi,
Just data dump:
Vanilla LibreOffice, cold start on Ubuntu, 366: 7sec; 404 9 sec; 410rc1 15 sec
Maybe just the rc1, or calculated because of the implementation of ??
Second start is fast, but also appr. twice as much: 2. .. / 2. .. / 4. ..
(Numbers Windos users prolly can only dream of ;) )
Comment 1 Michael Meeks 2013-07-03 18:51:08 UTC
Interesting; if you do:

export OOO_EXIT_POST_STARTUP=1
export OOO_DISABLE_RECOVERY=1

and run:

time ./soffice.bin -writer

a few times - what times do you get ? I see a small slow-down for 4.1 (which we need to fix), but it's not 2x:

1.642s for 4.1
1.335s for 4.0

over several runs. That's not ideal though, so I'll build a profile :-) Perf. regressions are also somewhat embarassing => mab4.1
Comment 2 Cor Nouws 2013-07-05 15:15:02 UTC
Hi Michael,
It's this:

$ time ./soffice.bin -writer
Warning: -writer is deprecated.  Use --writer instead.

real    0m22.989s
user    0m4.020s
sys    0m0.448s


real    0m4.316s
user    0m3.780s
sys    0m0.252s

real    0m4.345s
user    0m3.840s
sys    0m0.204s

real    0m4.346s
user    0m3.892s
sys    0m0.184s

real    0m4.300s
user    0m3.844s
sys    0m0.240s
Comment 3 Cor Nouws 2013-07-05 15:18:59 UTC
(all 410rc1 - 40x interesting too? )
Comment 4 Michael Meeks 2013-07-05 15:47:14 UTC
Sure - vital to compare on the same machine of course :-) I've pushed a few patches that get my time down to 1.580 or so; one of the biggest chunks of time is spend on fooling around with parsing and handling fonts that we don't care much about: AFMs - which is annoying.
Comment 5 Michael Meeks 2013-07-05 15:53:53 UTC
Oh - another -critical- thing to get right is that you must compare apples with apples; comparing the stock / distributed package of LibreOffice with a downloaded version is 100% unfair, and will inevitably be a lot slower: not using system libraries, not using --merge-libs etc. etc. are you comparing 2x download/installs of 4.0.x and 4.1.x ? you said Vanilla but ... ;-)
Comment 6 Commit Notification 2013-07-05 16:24:41 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5ab07df58bcc33423fabba2d0363cdde6a51f566

fdo#66524 - export a means of detecting preferred icon size for toolbars.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2013-07-05 16:24:58 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a2f4aed32257e183339a3513339bc59009c88527

fdo#66524 - defer loading and scaling AddOns images until necessary.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2013-07-05 16:25:16 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=67feb571330ec4b9eaff7791b27219b62d4c2f6a

fdo#66524 - defer population of AddOns toolbar icons until they are shown.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Cor Nouws 2013-07-05 20:01:36 UTC
(In reply to comment #5)

>                etc. etc. are you comparing
> 2x download/installs of 4.0.x and 4.1.x ? you said Vanilla but ... ;-)

Good question, but I've all the approximately 110 versions in parallel installation ;)


~/LibreOffice/404rc2/libreoffice4.0/program$ time ./soffice.bin -writer
Warning: -writer is deprecated.  Use --writer instead.

real	0m16.245s
user	0m3.556s
sys	0m0.312s

real	0m3.816s
user	0m3.352s
sys	0m0.204s

real	0m3.808s
user	0m3.328s
sys	0m0.224s

real	0m3.807s
user	0m3.376s
sys	0m0.168s
Comment 10 Commit Notification 2013-07-08 09:04:28 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0784de21830d34a47ece9aae2dfd1db99f04d301&h=libreoffice-4-1

fdo#66524 - export a means of detecting preferred icon size for toolbars.


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2013-07-08 09:04:47 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b508bad66665cac58ee47294d3d0a9a5b52f99b2&h=libreoffice-4-1

fdo#66524 - defer loading and scaling AddOns images until necessary.


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2013-07-08 09:05:06 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=706ed1aa74a3e68abe2ed80cd81db8f04150c247&h=libreoffice-4-1

fdo#66524 - defer population of AddOns toolbar icons until they are shown.


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Cor Nouws 2013-07-10 11:02:21 UTC
Hi Michael,
Thanks for your work on this.
Alas I'm not able to check master easilly (no x-86/32bits Debian dailies), but will try later (rc for 411).
Comment 14 Commit Notification 2013-07-11 19:13:47 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=019a8f3f74ec778d5fead4d2b4d47e75cf750bf7

Resolves: fdo#66524 string conversion gone wrong



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2013-07-11 19:14:04 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bfc060597078ff19fffbcbe21fb1dd41655a9e4c

Related: fdo#66524 don't invalidate font cache every time



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Caolán McNamara 2013-07-11 19:20:11 UTC
caolanm->cor: output of fc-list |wc -l ?, i.e. how many fonts do you have. If you've a lot then I reckon http://cgit.freedesktop.org/libreoffice/core/commit/?id=019a8f3f74ec778d5fead4d2b4d47e75cf750bf7 will make a major difference.
Comment 17 Commit Notification 2013-07-11 20:04:14 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e533ba0e521cf1da08c6b8d1b8229d5622bddcb5&h=libreoffice-4-1

Resolves: fdo#66524 string conversion gone wrong


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Cor Nouws 2013-07-11 21:34:21 UTC
(In reply to comment #16)
> caolanm->cor: output of fc-list |wc -l ?, i.e. how many fonts do you have.

Only 552 :)
(And still counting -slowly though- for cuite new designs).

> If you've a lot then I reckon
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=019a8f3f74ec778d5fead4d2b4d47e75cf750bf7 will make a major difference.

Look forward to that !
Thanks,
Comment 19 Commit Notification 2013-07-12 06:59:11 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-1-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=32e931cd08423bbe74a2532f7eba2b3f6c374233&h=libreoffice-4-1-0

Resolves: fdo#66524 string conversion gone wrong


It will be available already in LibreOffice 4.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Michael Meeks 2013-07-12 08:51:21 UTC
With Caolan's fix (and mine - which will not make it to -4-1-0 but only -4-1-1) I get from:

1.642s for 4.1.0rc1
1.460s for 4.1.1
vs.

1.335s for 4.0

So - nearly 'fixed' :-) I'll run a new callgrind trace to see what's else looks unexpected; clearly we badly need those perf. regression tests that Matus created running regularly.
Comment 21 Michael Meeks 2013-07-12 09:02:30 UTC
Doh; my numbers were messed up by having the logo toolbar visible; disabling that helps a lot; now back to:

1.380s for 4.1.1
vs.
1.335 for 4.0.0

The difference starts to approach measurement accuracy; will callgrind the right thing now ;-)
Comment 22 Michael Meeks 2013-07-12 09:20:35 UTC
Nothing else that is really obvious jumps out at me; though the framework / configmgr / vcl interaction around the construction of toolbars / frames around windows is 'orribly expensive I estimate ~25% of the time creating a handful of toolbars, and menus; which can't make sense.
Comment 23 Cor Nouws 2013-07-12 19:43:58 UTC
(In reply to comment #20)
 
> ....    clearly we badly need those perf. regression tests that
> Matus created running regularly.

Still I'm impressed (would love to have more time to spend in technical stuff ;) ) 
. Thanks!
Comment 24 Cor Nouws 2013-07-23 16:20:12 UTC
4.1.0.3 is back on normal speed :)
thanks