Bug 105428 - Reading color palette is slow
Summary: Reading color palette is slow
Status: RESOLVED DUPLICATE of bug 104312
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.1 rc
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0 target:5.3.4
Keywords: bibisected, bisected, perf, regression
Depends on:
Blocks:
 
Reported: 2017-01-18 19:24 UTC by Telesto
Modified: 2017-05-16 09:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
WinDBG Backtrace (5.34 MB, application/zip)
2017-03-05 17:12 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-01-18 19:24:19 UTC
Description:
There is a delay when reopening the Edit style menu for a second time after launch, one which wasn't there before

Steps to Reproduce:
1.Open a Writer document. 
2. Right Click it and select "Edit Style" (will take a few sec). 
3. Close it. 
4. Open it again; There is a small delay (2 sec) in 5.3.0.2

Actual Results:  
There is a small delay for reopening the "Edit Style" menu, which wasn't there before

Expected Results:
Instantaneous opening



Reproducible: Always

User Profile Reset: No

Additional Info:
Found in:
Version: 5.4.0.0.alpha0+
Build ID: 99eed82939999d9a9689788a4134dd05d5c20c5a
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-14_23:37:40
Locale: nl-NL (nl_NL); Calc: CL

and in:
Versie: 5.3.0.2 
Build ID: 5ad7b2889021c491af62f7930a4b1cb631392f16
CPU Threads: 4; Versie besturingssysteem:Windows 6.2; UI Render: standaard; Layout-Engine: nieuw; 
Locale: nl-NL (nl_NL); Calc: CL

but not in
Versie: 5.3.0.0.alpha1 
Build ID: f4ca1573fcf445164c068c1046ab5d084e1b005f
CPU Threads: 4; Versie besturingssysteem:Windows 6.2; UI Render: standaard; 
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Telesto 2017-01-18 19:26:35 UTC
Setting to NEW. Confirmed on IRC:
[20:12] <bearon> Telesto: i agree, please do the same thing :)
Comment 2 Aron Budea 2017-01-29 03:33:28 UTC Comment hidden (bibisection)
Comment 3 Aron Budea 2017-01-29 03:36:56 UTC
This slowness seems to have started with the addition of palettes, which as far as I can see are loaded again and again on each opening of the dialog.
Not adding Heiko, as it can't be fixed on UX side. Maybe caching of palettes could be the fix here.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=89488baf09d2e7580041462b409f587ce43af214
author		heiko tietze <tietze.heiko@gmail.com>	2016-12-17 10:48:02 (GMT)
committer	jan iversen <jani@documentfoundation.org>	2016-12-22 14:37:42 (GMT)

"tdf#87538 New standard color palette, tdf#104052 Add LibreColour HLC palette"

Btw, I first bibisected it with OpenGL enabled, and then I arrived to Khaled's commit for enabling the new layout engine:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8f2dd1df1d6cc94ebbc1149de72bc6d6dffa6533
Maybe more than one factors are at work here (at least with OpenGL rendering). It could probably use a bit of investigation...
Comment 4 tomaskeb 2017-02-08 21:32:07 UTC
*** Bug 105523 has been marked as a duplicate of this bug. ***
Comment 5 mike.hall 2017-02-08 23:30:13 UTC
Might be the same cause, but the problem exists on the first opening of the style dialogue. Also, the time waiting is considerably more than 2 secs.

On Win 10, LO 5.3.0.3 (64 bit) is consistently taking >45 seconds for the dialogue box to open, whether to modify or create a new style. It makes working with styles, if not impossible, exceedingly frustrating. Can the importance of this be raised? It's major for me.
Comment 6 tomaskeb 2017-02-13 12:53:20 UTC
I suggest this bug gets a higher priority, since it makes working with styles completely unusable…
Comment 7 Buovjaga 2017-02-13 13:00:42 UTC
(In reply to tomaskeb from comment #6)
> I suggest this bug gets a higher priority, since it makes working with
> styles completely unusable…

It would have to cause a crash to get a higher priority..
Comment 8 Telesto 2017-03-05 17:12:50 UTC
Created attachment 131657 [details]
WinDBG Backtrace

With non-debug build
Version: 5.4.0.0.alpha0+
Build ID: 472f92421b1b15dc765714a7c657704812859868
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-03-02_00:18:28

and with debug-build
Version: 5.4.0.0.alpha0+
Build ID: a5c947579253a7f4e784004e18929af5ab22fa28
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-03-02_01:57:01
Comment 9 Aron Budea 2017-04-26 12:58:27 UTC
I wonder if the palette could be read in advance and cashed.
Comment 10 Aron Budea 2017-05-07 03:16:21 UTC
This is essentially the same issue as bug 104312, just exacerbated by the larger palette.

*** This bug has been marked as a duplicate of bug 104312 ***
Comment 11 Commit Notification 2017-05-08 12:54:34 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104312, tdf#105428: use static vars in ReplaceStringHookProc

It will be available in 5.4.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 12 Telesto 2017-05-10 10:09:18 UTC
@Aron
There is still remains a small but quite noticeable delay (+/- 2 sec) when opening the Edit Style menu (or Character/ Paragraph) on MacOS. Similar to what I reported here for Windows

Version: 5.4.0.0.alpha1+
Build ID: 9d320ec4d818f86e58a15fd46248026502b1cc94
CPU threads: 4; OS: Mac OS X 10.12.5; UI render: GL; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2017-05-09_00:05:27
Locale: nl-NL (nl_NL.UTF-8); Calc: group
Comment 13 Commit Notification 2017-05-16 09:44:11 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=aafb6a75c7461362aceddeadfbf0db0848af866c&h=libreoffice-5-3

tdf#104312, tdf#105428: use static vars in ReplaceStringHookProc

It will be available in 5.3.4.

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.