Description: The selection of a drawing item isn't instantaneous. There is a small delay when selecting an drawing object. Steps to Reproduce: 1. Open attachment 129188 [details] 2. Select a the green square 3. Now select & immediately drag blue square Actual Results: There is a small delay before the dragging has some effect Expected Results: The dragging should occur without a lag as before in LibO5.0.0.5 Reproducible: Always User Profile Reset: No Additional Info: Found in Version: 5.4.0.0.alpha0+ Build ID: 79497f458727a0dea983847fe9d3873bf9c2e972 CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-01-24_03:10:09 Locale: nl-NL (nl_NL); Calc: CL and in Version: 5.1.0.3 Build ID: 5e3e00a007d9b3b6efb6797a8b8e57b51ab1f737 CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; Locale: nl-NL (nl_NL) but not in Version: 5.0.6.3 Build ID: 490fc03b25318460cfc54456516ea2519c11d1aa Locale: nl-NL (nl_NL) User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Setting to NEW: Conformation found here: https://bugs.documentfoundation.org/show_bug.cgi?id=104312#c19
e9f64da6cf2df55f4dfa08ab3d999a6f930d2b24 is the first bad commit commit e9f64da6cf2df55f4dfa08ab3d999a6f930d2b24 Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Sun Jul 19 17:43:27 2015 -0700 source 187445b2d2885ced92be37ffb11cd2a9bb11f8d6 # bad: [05d11632892a322664fb52bac90b2598b7fb7544] source 5616d22b57a9a5e57d545e912e029162a230829b # good: [c1efd324c6ad448ac9edb030dc9738b9e6899e4d] source ab465b90f6c6da5595393a0ba73f33a1e71a2b65 git bisect start '05d11632892a322664fb52bac90b2598b7fb7544' 'oldest' # bad: [97526ab777da7e58ce283c05498262ecdd4d6f7f] source 4ea70f87f7a2b61eda6e5ab1f48debf6fcfadc1f git bisect bad 97526ab777da7e58ce283c05498262ecdd4d6f7f # bad: [2202cdaa0eae3f646f1285a0ea45934edeb26e8a] source a88bf8fd10c42a15e5d6e66da656889c82b4933a git bisect bad 2202cdaa0eae3f646f1285a0ea45934edeb26e8a # good: [1d0a95445c203c11beb1aa5eae844cf178ea0984] source 8f324aebfb94c4b2023894121b954ad4f35eb395 git bisect good 1d0a95445c203c11beb1aa5eae844cf178ea0984 # bad: [2ab10dd694f52d975b104db63c74d74affc857cf] source c92853c93e537b75444ea2852777d73390de1b1a git bisect bad 2ab10dd694f52d975b104db63c74d74affc857cf # good: [131890245b4ecbfbc397a21035817baf2bbe1f6b] source cd3881d7171b828872db2ed0b3d49b580c3b17d1 git bisect good 131890245b4ecbfbc397a21035817baf2bbe1f6b # bad: [3926b127c7054a7fe24b0888481bb44f7f880b41] source 6a6d7766f49cc283be174aead9785f5a95287be4 git bisect bad 3926b127c7054a7fe24b0888481bb44f7f880b41 # good: [54e97a4be8f62c012717edb3065de98abb6ec65e] source 04834f4ad1682e7853536ffcdd9b19a9848c4c70 git bisect good 54e97a4be8f62c012717edb3065de98abb6ec65e # bad: [4c95545fc6a23b8eec032f2f7de688d1eb749d59] source 2a65bf32ec270484dcea4d22d3c93552dc0c24dd git bisect bad 4c95545fc6a23b8eec032f2f7de688d1eb749d59 # bad: [ba3573b3de0254e4a672db89a8ee11d6a7cff7ee] source cbe3b2fe0b9d745e22a2bf436ce55141b15f9502 git bisect bad ba3573b3de0254e4a672db89a8ee11d6a7cff7ee # bad: [e9f64da6cf2df55f4dfa08ab3d999a6f930d2b24] source 187445b2d2885ced92be37ffb11cd2a9bb11f8d6 git bisect bad e9f64da6cf2df55f4dfa08ab3d999a6f930d2b24 # good: [4b962b6a67aedf70302ea934350b2937a7a8f85b] source 70cba374f6862bb6b3568927267fc9e1fe3c0922 git bisect good 4b962b6a67aedf70302ea934350b2937a7a8f85b # good: [0cb70180b038b9d93d14c0a8c17b26ceddd99161] source a51ac4d2bb8c4f1ea1d4ea7569863e2fb6535b02 git bisect good 0cb70180b038b9d93d14c0a8c17b26ceddd99161 # good: [e222cec2f1d99cdab08c44e0f85d11b75efffbfd] source 77cc71476bae2b3655102e2c29d36af40a393201 git bisect good e222cec2f1d99cdab08c44e0f85d11b75efffbfd # first bad commit: [e9f64da6cf2df55f4dfa08ab3d999a6f930d2b24] source 187445b2d2885ced92be37ffb11cd2a9bb11f8d6
Bibisect points to the commit referenced below. It seems to be not only a unit test, but also include some sidebar code that must be causing the performance regression. Adding Cc: to Laurent Godard, please take a look. https://cgit.freedesktop.org/libreoffice/core/commit/?id=187445b2d2885ced92be37ffb11cd2a9bb11f8d6 author Laurent Godard <lgodard.libre@laposte.net> 2015-06-08 08:24:42 (GMT) committer Tomaž Vajngerl <quikee@gmail.com> 2015-06-23 06:38:56 (GMT) "Uno api sidebar unit test tdf#91806" Note that currently bug 104312 is causing a more severe performance issue, which likely has to be resolved before this bug can be investigated.
Bug 104312 is fixed thanks to Aron, but I'm still noticing this one on MacOS and Windows: Version: 5.4.0.0.alpha1+ Build ID: 9d320ec4d818f86e58a15fd46248026502b1cc94 CPU threads: 4; OS: Windows 6.2; UI render: default; TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-09_01:27:12 Locale: en-US (nl_NL); Calc: single
*** Bug 104326 has been marked as a duplicate of this bug. ***
The lag is most likely caused by the fact that the sidebar is refreshing when a new shape is selected, which causes the reload of all palette related files (for example standard.soc) It's working fine without sidebar. Version: 6.0.0.0.alpha0+ Build ID: 9f3814af7264ce90685a82cbf4eb015a38f22bf7 CPU threads: 4; OS: Windows 6.19; UI render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-06-28_00:47:42 Locale: nl-NL (nl_NL); Calc: CL
Am enclosing a memory profile trace produced on macOS with Apple's Instruments memory leak checker/profiler application. 1) Load test file 2) Select first square with mouse. 3) Select second square with mouse. 4) Repeat steps 2 and 3 for a total of 3 times (3 cycles) 5) Close the document. 6) Shut down the office process.
Created attachment 135607 [details] Memory leak profile
In PaletteManager.cxx : line 109: pPalette.reset(new PaletteSOC(aFileStat.getFileURL(), aFNameWithoutExt)); in the following block: { std::unique_ptr<Palette> pPalette; if( aFName.endsWithIgnoreAsciiCase(".gpl") ) pPalette.reset(new PaletteGPL(aFileStat.getFileURL(), aFNameWithoutExt)); else if( aFName.endsWithIgnoreAsciiCase(".soc") ) pPalette.reset(new PaletteSOC(aFileStat.getFileURL(), aFNameWithoutExt)); else if ( aFName.endsWithIgnoreAsciiCase(".ase") ) pPalette.reset(new PaletteASE(aFileStat.getFileURL(), aFNameWithoutExt)); if( pPalette && pPalette->IsValid() ) m_Palettes.push_back( std::move(pPalette) ); aNames.insert(aFNameWithoutExt); } seems to be invoked numerous times and not released.
In addition, there is also: tbcontrl.cxx, lines 3235-3236: void SvxColorListBox::EnsurePaletteManager() { if (!m_xPaletteManager) { m_xPaletteManager.reset(new PaletteManager); m_xPaletteManager->SetColorSelectFunction(m_aColorWrapper); m_xPaletteManager->SetLastColor(m_aSelectedColor.first); } }
(In reply to Alex Thurgood from comment #9) > In PaletteManager.cxx : > > line 109: > > pPalette.reset(new PaletteSOC(aFileStat.getFileURL(), aFNameWithoutExt)); >... I think this one needs "m_Palettes.clear();" in PaletteManager::~PaletteManager() (see https://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/PaletteManager.cxx#63)
(In reply to Alex Thurgood from comment #10) > In addition, there is also: > > tbcontrl.cxx, lines 3235-3236: > > void SvxColorListBox::EnsurePaletteManager() > { > if (!m_xPaletteManager) > { > m_xPaletteManager.reset(new PaletteManager); > m_xPaletteManager->SetColorSelectFunction(m_aColorWrapper); > m_xPaletteManager->SetLastColor(m_aSelectedColor.first); > } > } I think we should add m_xPaletteManager.reset(nullptr); in SvxColorToolBoxControl::~SvxColorToolBoxControl (see https://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/tbcontrl.cxx#2800) BTW, perhaps m_xPaletteManager from colorbox.hxx could be deleted since it seems unused. Here too, I'll be able to submit a patch about it tonight if nobody does it.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c0cc5cd7befffc6e8e6361ba67807a799cc997f Related tdf#105500: leaks in PaletteManager and SvxColorToolBoxControl It will be available in 6.0.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.
(In reply to Commit Notification from comment #13) > Julien Nabet committed a patch related to this issue. > It has been pushed to "master": > > http://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=8c0cc5cd7befffc6e8e6361ba67807a799cc997f > > Related tdf#105500: leaks in PaletteManager and SvxColorToolBoxControl I doubt this patch does anything. ~SvxColorToolBoxControl destructs all it's members including m_xPaletteManager. The unique_ptr<PaletteManager> destructor calls destructor of the PaletteManager object. ~PaletteManager destructs all it's members too. This includes the vector m_Palettes. A vector destructor calls the destructor for all objects it holds (clear() does the same). So finally the unique_ptr<Pallette> destructors release all the Palette objects. We don't have to worry about reset, clear, delete or anything. That said, I don't see any obvious leaks. But I got no idea how to interpret attachment 135607 [details], looks like it's only listing allocations.
Noel Grandin committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bc8a46534e03d9dc81c92756957cbae84d72b953 Revert "Related tdf#105500: leaks in PaletteManager and SvxColorToolBoxControl" It will be available in 6.0.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.
It seems to work without any issue - on MacOS - when I remove the following: // TODO: this call is redundant but mandatory for unit test to update context on document loading UpdateConfigurations(); https://opengrok.libreoffice.org/xref/core/sfx2/source/sidebar/SidebarController.cxx#281
*** Bug 109257 has been marked as a duplicate of this bug. ***
Removing "target:6.0.0". The commit in question has been reverted. The issue seems to be the most problematic on MacOS. The reports are still coming in, but end up in general MacOS performance bug reports: https://bugs.documentfoundation.org/show_bug.cgi?id=106154#c28 https://bugs.documentfoundation.org/show_bug.cgi?id=106703#c2 I priority bump would be nice (in my opinion). The source of the problem is known (comment 16).
With last 5.x revision it was even worst. Draw module was not usable, all the interface was so slow and so unresponsiness... Even with the sidebar hidden rgere was noticable lags.
Repro with Version: 6.3.0.0.alpha0+ Build ID: 20ea90a557b5bc744fd234e3a20ab1db484cf88b CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; TinderBox: Win-x86@42, Branch:master, Time: 2019-03-22_03:21:58 Locale: nl-NL (nl_NL); UI-Language: en-US Calc: threaded
WFM, how about you? Version: 7.1.0.0.alpha0+ (x64) Build ID: 3c6177be2705303044e3de262689d593f3d0f282 CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win Locale: da-DK (en_DK); UI: en-US Calc: threaded
I agree. Reverse bibisected the fix with repo bibisect-linux-64-7.0 to the following commit. Let's close as FIXED. https://cgit.freedesktop.org/libreoffice/core/commit/?id=5b77d17c4f1ca734babf962b45c1aa07bdca14e9 author Michael Meeks <michael.meeks@collabora.com> 2020-01-04 18:09:20 +0000 committer Michael Meeks <michael.meeks@collabora.com> 2020-01-06 19:16:28 +0100 sidebar: allow panels to lurk around instead of being disposed.