Bug 112532 - Color picker widget is slow to initialize - does not cache color palette data
Summary: Color picker widget is slow to initialize - does not cache color palette data
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: perf
: 106588 113983 (view as bug list)
Depends on:
Blocks: Color-Picker-Widget
  Show dependency treegraph
Reported: 2017-09-20 17:25 UTC by Gabor Kelemen
Modified: 2019-11-07 03:33 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen 2017-09-20 17:25:08 UTC
While working on bug#105000 - and sprinkling a few SAL_WARN into SvxUnoConvertResourceStringBuiltIn() of svx/source/unodraw/unoprov.cxx [1] - I noticed that the color picker widget runs this color palette initalization method every time it is instantiated. 
This is problematic if there is a window with more than one of this widget, like Options - LibreOffice - Application colors or Options - Writer - Changes, causing slow reaction from the window and a spike in CPU usage as well.

For each widget instance it seems like the current color palette is being read and processed, but this seems to be unnecessary a bit and might be cacheable for better performance. 

[1] https://opengrok.libreoffice.org/xref/core/svx/source/unodraw/unoprov.cxx#1588
Comment 1 Julien Nabet 2017-09-20 18:43:50 UTC
I agree. It seems we call PaletteManager ctr quite a lot each time we access this.
On the contrary if you change the color of the word with button on standard bar, it creates a new PaletteManager which stays until you close LO.

There's also a pb of memory leaking, see tdf#111894 and new try to fix this: https://gerrit.libreoffice.org/#/c/42494/2
Comment 2 Julien Nabet 2017-09-20 18:44:46 UTC
Telesto: even if you're not a dev, thought you might be interested in this one since it concerns perf/leak
Comment 3 Telesto 2017-09-21 11:17:07 UTC
*** Bug 106588 has been marked as a duplicate of this bug. ***
Comment 4 Aron Budea 2017-11-21 22:31:36 UTC
*** Bug 113983 has been marked as a duplicate of this bug. ***
Comment 5 Aron Budea 2017-12-24 08:53:33 UTC
I have a fix in the works for caching palettes, but it's not going to solve the slowness of initializing many color picker widgets (what isn't related to file reading). Anyway, it's better than nothing, and one of the duplicate tickets can be reopened for the remaining performance issue.
Comment 6 Xisco Faulí 2018-03-26 18:57:38 UTC
Dear Aron Budea,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 7 QA Administrators 2019-11-07 03:33:36 UTC
Dear Gabor Kelemen,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team