Description: The gif animation takes a steady disk i/o around 530 kb/s. With LibO 5.0.0.5 the disk I/O is around 0 kb/s Steps to Reproduce: 1.Download http://forums.x-plane.org/uploads/monthly_2016_07/GPS24golden.gif.5d39c488452fdbfe7ac47db70df3cbc8.gif 2.Open Writer 3.Add gif to writer document 2.Take notice of disk I/O soffice.bin (with Process Explorer for example) Actual Results: Relatively high disk and CPU usage Expected Results: Nearly no disk usage Reproducible: Always User Profile Reset: No Additional Info: Found in: Version: 5.4.0.0.alpha0+ Build ID: 84f2ff67a7e404febf710b1dc7f66d06745c503f CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2016-12-09_23:20:01 Locale: nl-NL (nl_NL); Calc: CL but not in Version: 5.0.0.5 Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b Locale: en-US (nl_NL) User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Created attachment 129622 [details] Additional example
Created attachment 129635 [details] Process Monitor Output LO5400 Quite a large file for just 45 seconds or so.. same pattern over and over: 15:34:09.3257989 soffice.bin 1276 CreateFile C:\Program Files (x86) SUCCESS Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 15:34:09.3258149 soffice.bin 1276 QueryDirectory C:\Program Files (x86)\LibreOfficeDev 5 SUCCESS Filter: LibreOfficeDev 5, 1: LibreOfficeDev 5 15:34:09.3258279 soffice.bin 1276 CloseFile C:\Program Files (x86) SUCCESS 15:34:09.3258788 soffice.bin 1276 CreateFile C:\Program Files (x86)\LibreOfficeDev 5 SUCCESS Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 15:34:09.3259038 soffice.bin 1276 QueryDirectory C:\Program Files (x86)\LibreOfficeDev 5\share SUCCESS Filter: share, 1: share 15:34:09.3259146 soffice.bin 1276 CloseFile C:\Program Files (x86)\LibreOfficeDev 5 SUCCESS 15:34:09.3259562 soffice.bin 1276 CreateFile C:\Program Files (x86)\LibreOfficeDev 5\share SUCCESS Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 15:34:09.3259718 soffice.bin 1276 QueryDirectory C:\Program Files (x86)\LibreOfficeDev 5\share\config SUCCESS Filter: config, 1: config 15:34:09.3259833 soffice.bin 1276 CloseFile C:\Program Files (x86)\LibreOfficeDev 5\share SUCCESS 15:34:09.3260333 soffice.bin 1276 CreateFile C:\Program Files (x86)\LibreOfficeDev 5\share\config SUCCESS Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 15:34:09.3260498 soffice.bin 1276 QueryDirectory C:\Program Files (x86)\LibreOfficeDev 5\share\config\images_oxygen.zip SUCCESS Filter: images_oxygen.zip, 1: images_oxygen.zip 15:34:09.3260622 soffice.bin 1276 CloseFile C:\Program Files (x86)\LibreOfficeDev 5\share\config SUCCESS 15:34:09.3261176 soffice.bin 1276 CreateFile C:\Program Files (x86)\LibreOfficeDev 5\share\config SUCCESS Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 15:34:09.3261345 soffice.bin 1276 QueryDirectory C:\Program Files (x86)\LibreOfficeDev 5\share\config\images_oxygen.zip SUCCESS Filter: images_oxygen.zip, 1: images_oxygen.zip 15:34:09.3261468 soffice.bin 1276 CloseFile C:\Program Files (x86)\LibreOfficeDev 5\share\config SUCCESS
Confirming on Windows 8.1 Ent 64-bit en-US with Version: 5.3.0.0.beta2 (x64) Build ID: a7e30712ad6d8bc9286007b37aa581983e0caba3 CPU Threads: 8; OS Version: Windows 6.29; UI Render: default; Layout Engine: new; Locale: en-US (en_US); Calc: CL or recent master Version: 5.4.0.0.alpha0+ Build ID: a238c829b209d0708714aa753fb686525411825f CPU Threads: 8; OS Version: Windows 6.29; UI Render: default; TinderBox: Win-x86@39, Branch:master, Time: 2016-12-08_10:37:27 Locale: en-US (en_US); Calc: CL For some reason, when the animated GIF is refreshing canvas in Writer there is a recurring opening, read, and closing of every directory and zip'd archive in the share\config directory. The same animated GIF inserted to Impress canvas does not exhibit repetitive share\config directory access and Disk I/O for LibreOffice PID is negligible.
Also found in: Version: 5.0.2.2 Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe Locale: en-US (nl_NL)
*** Bug 104584 has been marked as a duplicate of this bug. ***
Adding "needsDevAdvice" because it seems related to bug 104589.
Created attachment 129670 [details] SAL_LOG=+TIMESTAMP+INFO,+WARN SALLOG of laucning and opening/running 'Additional example' Version: 5.4.0.0.alpha0+ Build ID: d538d3d84172a74dfe97d59a6d3daf9a45459cab CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; TinderBox: Win-x86@39, Branch:master, Time: 2016-12-14_00:28:59 Locale: nl-NL (nl_NL); Calc: CL
Aron, could you take a look at this one. Found in: Version: 5.4.0.0.alpha0+ Build ID: b41186a2fc49e440890b8c86e5367352ffaf9cd6 CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-01-26_01:50:40 Locale: nl-NL (nl_NL); Calc: CL and in Version: 5.0.2.2 Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe Locale: en-US (nl_NL) but not in: Version: 5.0.0.5 Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b Locale: en-US (nl_NL)
Bibisected with repo bibisect-win32-5.1. b44ce333cd35cc8da590bfcbf7dc8ff991830cc2 is the first bad commit commit b44ce333cd35cc8da590bfcbf7dc8ff991830cc2 Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Mon Aug 10 13:21:16 2015 -0700 source cd064472ce4ff9d1dd6720c32fde22f36eb232f4 # bad: [05d11632892a322664fb52bac90b2598b7fb7544] source 5616d22b57a9a5e57d545e912e029162a230829b # good: [e222cec2f1d99cdab08c44e0f85d11b75efffbfd] source 77cc71476bae2b3655102e2c29d36af40a393201 git bisect start '05d11632892a322664fb52bac90b2598b7fb7544' 'e222cec' # bad: [d9d948fb49a6ef23acccf6d889e1f8c046daa352] source 9a5ba07ca190df89cf0cacbeca7cfafde1794686 git bisect bad d9d948fb49a6ef23acccf6d889e1f8c046daa352 # good: [c12b73df8d589d90fac62e492d642a9f168283cb] source 0dc79f35aa3a373414c17f596ca4491a69083864 git bisect good c12b73df8d589d90fac62e492d642a9f168283cb # bad: [a01b8771c0f6e6a79560600011796a88c6f003fa] source d4ac7380e5675e165950c40edb45e6d17ac25b33 git bisect bad a01b8771c0f6e6a79560600011796a88c6f003fa # bad: [4f8f3f47168a5d73e3f7d0406e4140e9a90a4867] source 5a2d6bf3a94f127307d6a9464033b2226508ff38 git bisect bad 4f8f3f47168a5d73e3f7d0406e4140e9a90a4867 # bad: [b35ebe3de453501fae0734ec0715ec1c7e0e1c79] source 6d4f97b05b1bfe5aae395134b2dc35805c23b8c4 git bisect bad b35ebe3de453501fae0734ec0715ec1c7e0e1c79 # bad: [c09504d6242d5c16aa8cc4bd0169788ef7b6d5d9] source 5975874141148e9f7199eca3a82735fccd7cf150 git bisect bad c09504d6242d5c16aa8cc4bd0169788ef7b6d5d9 # bad: [e2f51febc3f113a4677b18e24b13bb6a1780717e] source e12dc8fe8de1099fb1d34ac88d198ff623dbb4be git bisect bad e2f51febc3f113a4677b18e24b13bb6a1780717e # good: [4e570bf1af8ad6de64aeebae74c1f5277a6cbd5e] source 958ec9ccfe3bbe54369f9e9105c10beae80d9548 git bisect good 4e570bf1af8ad6de64aeebae74c1f5277a6cbd5e # good: [e929237f850cb1d73410255f8f1dff67c44e2de0] source 058c924c9385d003eefa728be7b23b2effd73913 git bisect good e929237f850cb1d73410255f8f1dff67c44e2de0 # good: [85221b407058a5eb837f9525d693aac0b3731c63] source 711b34d590e659ed754f7c57b3b5eb12acfbbd78 git bisect good 85221b407058a5eb837f9525d693aac0b3731c63 # bad: [b44ce333cd35cc8da590bfcbf7dc8ff991830cc2] source cd064472ce4ff9d1dd6720c32fde22f36eb232f4 git bisect bad b44ce333cd35cc8da590bfcbf7dc8ff991830cc2 # good: [0621c0881841f99f994b92bff2d54bd725f131af] source ae9a59382f11166da44512a01ae38fc4790ac0d4 git bisect good 0621c0881841f99f994b92bff2d54bd725f131af # good: [7d441bd8e0bfecb8e51a166e8177de1996071de5] source 0f4b3cb7d3d68906de316a64dcec281da2a641bd git bisect good 7d441bd8e0bfecb8e51a166e8177de1996071de5 # first bad commit: [b44ce333cd35cc8da590bfcbf7dc8ff991830cc2] source cd064472ce4ff9d1dd6720c32fde22f36eb232f4
So the change is from Miklos Vajna, but the issue is coming from PaintBufferGuard that he started using in this commit. See partial stack trace below. Note ImplAnimView::draw(...) in the middle of it, and the calls deeper that seem to be responsible for reading directories. https://cgit.freedesktop.org/libreoffice/core/commit/?id=cd064472ce4ff9d1dd6720c32fde22f36eb232f4 "author Miklos Vajna <vmiklos@collabora.co.uk> 2015-08-10 14:44:03 (GMT) committer Miklos Vajna <vmiklos@collabora.co.uk> 2015-08-10 16:23:59 (GMT) commit cd064472ce4ff9d1dd6720c32fde22f36eb232f4 (patch) tdf#93325 ImplAnimView rendercontext: stop painting animgifs directly" Trace: vcllo.dll!vcl::IconThemeScanner::ReadIconThemesFromPath(const rtl::OUString & dir) Line 104 C++ vcllo.dll!vcl::IconThemeScanner::ScanDirectoryForIconThemes(const rtl::OUString & path) Line 74 C++ vcllo.dll!vcl::IconThemeScanner::Create(const rtl::OUString & path) Line 162 C++ vcllo.dll!ImplStyleData::ImplStyleData() Line 532 C++ vcllo.dll!std::_Ref_count_obj<ImplStyleData>::_Ref_count_obj<ImplStyleData><>() Line 932 C++ vcllo.dll!std::make_shared<ImplStyleData>() Line 1003 C++ vcllo.dll!StyleSettings::StyleSettings() Line 772 C++ vcllo.dll!ImplAllSettingsData::ImplAllSettingsData() Line 2658 C++ vcllo.dll!std::_Ref_count_obj<ImplAllSettingsData>::_Ref_count_obj<ImplAllSettingsData><>() Line 932 C++ vcllo.dll!std::make_shared<ImplAllSettingsData>() Line 1003 C++ vcllo.dll!AllSettings::AllSettings() Line 2697 C++ vcllo.dll!PaintBufferGuard::PaintBufferGuard(ImplFrameData * pFrameData, vcl::Window * pWindow) Line 47 C++ vcllo.dll!ImplAnimView::draw(unsigned long nPos, VirtualDevice * pVDev) Line 197 C++ vcllo.dll!Animation::ImplTimeoutHdl(Timer * __formal) Line 442 C++ vcllo.dll!Animation::LinkStubImplTimeoutHdl(void * instance, Timer * data) Line 343 C++ vcllo.dll!Link<Timer *,void>::Call(Timer * data) Line 84 C++ vcllo.dll!Timer::Invoke() Line 90 C++ vcllo.dll!ImplSchedulerData::Invoke() Line 48 C++ vcllo.dll!Scheduler::ProcessTaskScheduling(bool bIdle) Line 161 C++ vcllo.dll!Scheduler::CallbackTaskScheduling(bool bIdle) Line 123 C++ vcllo.dll!SalTimer::CallCallback(bool idle) Line 55 C++ vcllo.dll!EmitTimerCallback() Line 174 C++ <snip>
A Process Monitor stack trace osl_setFileTime + 0x4bf osl_setFileTime + 0x411 osl_setFileTime + 0x411 osl_setFileTime + 0x411 osl_setFileTime + 0x411 osl_setFileTime + 0x411 osl_setFileTime + 0x411 osl_setFileTime + 0x2be osl_getFileStatus + 0x20e vcl::IconThemeScanner::ReadIconThemesFromPath + 0x14c vcl::IconThemeScanner::ScanDirectoryForIconThemes + 0x94 vcl::IconThemeScanner::Create + 0x8d vcl::IconThemeSelector::IconThemeSelector + 0x103a Task::Stop + 0x4131 vcl::IconThemeSelector::IconThemeSelector + 0x286 Task::Stop + 0x3d31 AllSettings::AllSettings + 0x10 ImplControlValue::ImplControlValue + 0x86 Animation::ImplIncAnimCount + 0x1b3 Animation::ImplTimeoutHdl + 0x3a5 Animation::LinkStubImplTimeoutHdl + 0xe Timer::Invoke + 0xd WinBlocklistParser::parse + 0xaf22 WinBlocklistParser::parse + 0x8f20
Created attachment 136059 [details] Instrument screenshots Based on the stack in comment 10 a small sneak peak into the source code how often specific parts are called related to ImplAnimView::draw and PaintBufferGuard. I can't make much of it, but hopefully someone else can.
No repro with: Version: 6.0.0.0.alpha1+ Build ID: b17294826830e278d060c876cf4f94a9b4ec16cc CPU threads: 4; OS: Windows 6.3; UI render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-10-23_06:32:42 Locale: nl-NL (nl_NL); Calc: CL