When drawing a shape (a square for example) on the drawing canvas, there is quite a bit of lag. The program's lag gets even worse when I try to select things by dragging a square around objects. It takes a few seconds for the selection square to even appear, and then a few more seconds for it to catch up with the position of my mouse.
Please provide a sample document and step by step instructions that clearly shows the behaviour you are experiencing. I can't reproduce this behaviour in a simple test Draw document containing 5 different default shapes with varying colour fills, and then drawing a select rectangle with the mouse over them. Version: 5.2.3.3 Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf Threads CPU : 8; Version de l'OS :Mac OS X 10.12.1; UI Render : par défaut; Locale : fr-FR (fr_FR.UTF-8); Calc: group
Also please provide your OSX hardware setup
Created attachment 129188 [details] Example
Confirming with: Version: 5.4.0.0.alpha0+ Build ID: 2bad9f1cd8da0cd3d8ff33e875eaf10c1fd9d0bf CPU Threads: 4; OS Version: Mac OS X 10.12.1; UI Render: default; TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-11-29_01:04:44 Locale: nl-NL (nl_NL.UTF-8); Calc: group Steps to reproduce 1. Open attached file 2. Select green square 3. Select blue square 4. Take notice time required before the selection square appears
Created attachment 129189 [details] Example drawing document
Version: 5.2.3.3 Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf CPU Threads: 4; OS Version: Mac OS X 10.12.2; UI Render: GL; Locale: en-US (en_US.UTF-8); Calc: group Steps to reproduce (As Telesto mentioned): 1. Open the document 2. Use select cursor to drag a selection box around objects 3. Wait for selection box to show up because it is lagging 4. Wait for selection box to catch up with mouse after it shows up Also, this happens whether or not I have OpenGL turned on.
Created attachment 129199 [details] LLDB backtrace Backtrace will switching selecting a square. Done with: Version: 5.4.0.0.alpha0+ Build ID: 2bad9f1cd8da0cd3d8ff33e875eaf10c1fd9d0bf CPU Threads: 4; OS Version: Mac OS X 10.12.2; UI Render: default; TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-11-29_01:04:44 Locale: en-US (en_US.UTF-8); Calc: group
I noticed there is also the same initial delay for drawing a shape while in Writer
With the test file provided by Telesto, and on my Mac-mini (mid-2010), I can confirm also with Version: 5.2.3.3 Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf Threads CPU : 2; Version de l'OS :Mac OS X 10.12.1; UI Render : par défaut; Locale : fr-FR (fr_FR.UTF-8); Calc: group My previous testing of my own shape addition and selection was carried out on a more recent Macbook Pro, which might explain why I saw no noticeable difference - the shapes were also smaller. In Telesto's trace there seems to be a lot of expenditure in populating objects of the shape in the sidebar - could it be that this represents a bottleneck and that the selection outline is only drawn once all of the shape's properties have populated the sidebar control ? No idea who is responsible for this stuff, but confirming
Tested the same ODG file against Version: 4.1.4.2 Build ID: 0a0440ccc0227ad9829de5f46be37cfb6edcf72 on same Mac mini hardware and the selection outline display is instantaneous (or virtually), which would tend to validate my hypothesis that it is the implementation of the sidebar that causes the lag in recent versions.
@Thorsten, Armin : thoughts ?
*** Bug 104326 has been marked as a duplicate of this bug. ***
*** Bug 104427 has been marked as a duplicate of this bug. ***
If 104427 is the same bug, then this appears by 5.2.2.2 and amost certainly earlier.
The cause seems to be a SQLite issue. Within the backtrace I noticed different errors concerning SQLite. For example: libsqlite3.dylib`sqlite3StartTable: "temporary table name must be unqualified" "unknown database %T" "not authorized" "there is already an index named %s" "table %T already exists" "authorizer malfunction" libsqlite3.dylib`yy_reduce: "parser stack overflow" "Expression tree is too large (maximum depth %d)" ; "too many terms in compound SELECT" "syntax error after column name "%.*s"" "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers" "temporary trigger may not have qualified name" ; "too many arguments on function %T" "syntax error after column name "%.*s"" "qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers" "the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers" ; "parameters are not allowed in views" ; "too many terms in compound SELECT" "ROLLBACK" "not authorized" "variable number must be between ?1 and ?%d" "corrupt database" "too many columns on %s" "index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped" "Cannot add a column to a view" "Cannot add a UNIQUE column" "virtual tables may not be altered" "near "%T": syntax error" "authorizer malfunction"
Created attachment 129451 [details] BUILDLOG; LLDB Backtrace and SAL_LOG New backtrace. Done with: Version: 5.4.0.0.alpha0+ Build ID: a564821eb9e991774195120e6965b2a8b1419dc5 CPU Threads: 4; OS Version: Mac OS X 10.12.2; UI Render: default; Locale: en-US (en_US.UTF-8); Calc: group The trace looks different compared to the first one and partly the same as bug 99784 (compare frame 91 with frame 13)
Issue is also noticeable with Windows. Fast switching between items and dragging them around feels a bit sluggish, compared to 4.4.6.3. CPU usage is also a bit higher. 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 and in Version: 5.3.0.0.alpha1+ Build ID: 43b5ca69aa545cf93eded55258d92d651917815f CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-18_05:27:05 Locale: nl-NL (nl_NL); Calc: CL Less prone in versie 5.2.2.1 but CPU usage is still a bit higher compared to 4.4.6.3 Build ID: 3c2231d4aa4c68281f28ad35a100c092cff84f5d CPU Threads: 4; Versie besturingssysteem:Windows 6.2; UI Render: standaard; Locale: nl-NL (nl_NL); Calc: CL
Bibisected with bibisect-linux-64-5.3. 1st bibisect: bcdf4ea1ba4e6e9d1dbc89aec66fe57c89945634 is the first bad commit commit bcdf4ea1ba4e6e9d1dbc89aec66fe57c89945634 Author: Jenkins Build User <tdf@pollux.tdf> Date: Mon Nov 7 22:23:35 2016 +0100 source 64a708cba9b954afe3331f63c58218eb53b3d0ce # bad: [1bfd8dda84f0dd2c5662b64f382637d75b8bf227] source 6238f71ddbdc766e733b1c808a4fa7d66f7bde87 # good: [33e60eae04c889baf52713a73dc9944015408914] source 5b168b3fa568e48e795234dc5fa454bf24c9805e git bisect start '1bfd8dda84f0dd2c5662b64f382637d75b8bf227' 'oldest' # good: [964789dfd0674f0447da363a8c52114097796fa3] source e473e0e1b9bc354d53908cb0ca84db06c3051fe2 git bisect good 964789dfd0674f0447da363a8c52114097796fa3 # good: [82e6762ef9ce5acd3ee832074a327ac43d94173a] source 6f345e1e6e2d7f6fdbd746dfd0c91843a5ff2d10 git bisect good 82e6762ef9ce5acd3ee832074a327ac43d94173a # good: [b496470a254d264be0b15764e76d3ae0cff325da] source 1bbf7f653b6b159afb0bf2c34dd463f58333852c git bisect good b496470a254d264be0b15764e76d3ae0cff325da # bad: [85b3496336990ff6a25b39bcb67a0564136455dc] source 2fdbe655bb63dd40fda9b684c5715f21fd5ab639 git bisect bad 85b3496336990ff6a25b39bcb67a0564136455dc # bad: [2d5c8caa3097fd3bdef457bc3fc58e10df57bf22] source d115a235bf3ff5366d992d01fb418a3eacb9d125 git bisect bad 2d5c8caa3097fd3bdef457bc3fc58e10df57bf22 # good: [9b38dac0365bc16742982f4e682ac08f63bba65a] source 703d00e335bf0d38b3019ec2ba095b27a5fdba2d git bisect good 9b38dac0365bc16742982f4e682ac08f63bba65a # good: [8701a36236355ead58796c3ba4227f8cd75b6bcf] source d9c43a1d543774055dd8aa0d8584b36519236238 git bisect good 8701a36236355ead58796c3ba4227f8cd75b6bcf # bad: [9b978929de65707543227e9fb29ac512e9bcf51d] source cc2d27ea1ef4018d0865095853e7d661f8070e1f git bisect bad 9b978929de65707543227e9fb29ac512e9bcf51d # bad: [69424e2f7a69fe4abe6e64f3e686af05d05412a8] source bc57a3e319bccb2d48549a3134d5dcd4336d4533 git bisect bad 69424e2f7a69fe4abe6e64f3e686af05d05412a8 # bad: [249f1e78867115a21463e2416930fc90fdb29e8c] source 05d2a66955f8a6552a79696474386ca9f45f9ef2 git bisect bad 249f1e78867115a21463e2416930fc90fdb29e8c # good: [d283d0bb9a901c9207fcd40b1cbf7cde6c9f9836] source f9028f1945e3ad87cda1b3001611632b1b424467 git bisect good d283d0bb9a901c9207fcd40b1cbf7cde6c9f9836 # good: [3ab87d19f6dfa58afdf4d63e0865419b7af8534c] source f01c49c4a89ecad2376fd0023625186e5cac642e git bisect good 3ab87d19f6dfa58afdf4d63e0865419b7af8534c # bad: [bcdf4ea1ba4e6e9d1dbc89aec66fe57c89945634] source 64a708cba9b954afe3331f63c58218eb53b3d0ce git bisect bad bcdf4ea1ba4e6e9d1dbc89aec66fe57c89945634 # first bad commit: [bcdf4ea1ba4e6e9d1dbc89aec66fe57c89945634] source 64a708cba9b954afe3331f63c58218eb53b3d0ce 2nd bibisect: 5785e785750b6bef922e2d1f9ac5e9e6f1174cd8 is the first bad commit commit 5785e785750b6bef922e2d1f9ac5e9e6f1174cd8 Author: Jenkins Build User <tdf@pollux.tdf> Date: Sat Nov 5 07:06:56 2016 +0100 source f9a2c1c12ecad833c63b894c89d6008907477eb5 source f9a2c1c12ecad833c63b894c89d6008907477eb5 source f300754bb1c6a347c92bb9548be7a65237176542 source 347c2c334589b18cc62af292674bb3df1dd54b71 source 604b35bf55351751a396e34dcca3f85e75860fd5 source 351a97ce6bda3075677b59fa1387ba3d1ab17d7a source df738e0f8ceedb4bad756960be14d9c41adc165d source 08d6cd788f2584ce10ab8fa10665245e953c59d9 source a19b18ad7c9eb0197c10e6d7e451ec4542e4bc9e source a989a0b1f2b425f05b58d0e44ce2de31c842ed65 source 760a198e697f3070a5e0e029e4eff7be220eb9cd source 8bea644d6117a49405e6426dc97214220fc869d1 source d2ce812f1d3a7a2aad89ca0bd11948b63d2db7b0 source 43bc3031483d172eccd72c3804e2d4fc2ef37de4 # bad: [3c9fa6559398b7ff22f000979de259fe76159d33] source db380aab1063e8a5e40111c40ee9f7921aa82601 # good: [b496470a254d264be0b15764e76d3ae0cff325da] source 1bbf7f653b6b159afb0bf2c34dd463f58333852c git bisect start '3c9fa65' 'b496470' # good: [5c96b6172c6159c0cb0f68050e0049059198dec5] source 9130627e21dd7c52c5eee1acc4b71f86eb9f3118 git bisect good 5c96b6172c6159c0cb0f68050e0049059198dec5 # bad: [f391fca334da33741ae9bd002f67e514eff42576] source 19fa8aae970f66a808a3757b0de34fa9caee2ec4 git bisect bad f391fca334da33741ae9bd002f67e514eff42576 # good: [e793e33aacc68570adc4b7f1190d83503752bcd0] source 334a03d801f750c6c97e02ced4cc66e680888196 git bisect good e793e33aacc68570adc4b7f1190d83503752bcd0 # good: [e9cd5a5959f3e6f64d62f5edaace38e187f3c3f1] source 6b571ae4608ac15256eb7582f442ce69975370f3 git bisect good e9cd5a5959f3e6f64d62f5edaace38e187f3c3f1 # good: [c985e66f5838d7ce53a97d571bbd0cf089b64faa] source 44523738f094ff3987e85ea0c47b8c636bbe5786 git bisect good c985e66f5838d7ce53a97d571bbd0cf089b64faa # bad: [b373133be65c856417a795bca8f63f956eff813b] source 4e59168ef004e7520ea7d78237a18208216a757c git bisect bad b373133be65c856417a795bca8f63f956eff813b # bad: [5785e785750b6bef922e2d1f9ac5e9e6f1174cd8] source f9a2c1c12ecad833c63b894c89d6008907477eb5 git bisect bad 5785e785750b6bef922e2d1f9ac5e9e6f1174cd8 # first bad commit: [5785e785750b6bef922e2d1f9ac5e9e6f1174cd8] source f9a2c1c12ecad833c63b894c89d6008907477eb5
Bibisect first pointed to this commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=64a708cba9b954afe3331f63c58218eb53b3d0ce author Caolán McNamara <caolanm@redhat.com> 2016-11-05 20:28:27 (GMT) committer Caolán McNamara <caolanm@redhat.com> 2016-11-07 21:04:50 (GMT) "Revert "Reverts a commit series that cripple windows ci." " Which pointed to this commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=db380aab1063e8a5e40111c40ee9f7921aa82601 author Norbert Thiebaud <nthiebaud@gmail.com> 2016-11-05 18:28:17 (GMT) committer Norbert Thiebaud <nthiebaud@gmail.com> 2016-11-05 18:42:40 (GMT) "Reverts a commit series that cripple windows ci." Then I did a second bibisect on the preceding commits, which, to no surprise pointed to the this range: https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=43bc3031483d172eccd72c3804e2d4fc2ef37de4..f9a2c1c12ecad833c63b894c89d6008907477eb5 ...which is the same series of commits. Since the author is Caolán, adding Cc: to Caolán McNamara, please take a look. If these commits build on Linux, and a bisect would be helpful, I can do that, just let me know. Btw, I used attachment 129188 [details] provided by Telesto in comment 3. There is another, small performance drop between 5.0.0.5 and 5.1.0.3 from instant switching to almost instant switching (with same ODG file), please open a separate bug report on that.
does (in daily master post 9954a91eb841225950ef28a24be5a38abdcb42a9) this now https://cgit.freedesktop.org/libreoffice/core/commit/?id=9954a91eb841225950ef28a24be5a38abdcb42a9 make a difference ?
I'm afraid not. However, I've got some profiling results (not easy to share in a meaningful way, Very Sleepy is a very simple tool), and it seems the sidebar UI elements are recreated again and again: `anonymous namespace'::UIElementFactoryManager::createUIElement `anonymous namespace'::PanelFactory::createUIElement svx::sidebar::AreaPropertyPanel::Create svx::sidebar::TextPropertyPanel::Create svx::sidebar::ShadowPropertyPanel::Create svx::sidebar::ParaPropertyPanel::Create svx::sidebar::LinePropertyPanel::Create svx::sidebar::PosSizePropertyPanel::Create This whole thing took up roughly 80% of time during the profiling run.
Hi Aron - awesome work - next step would be to whack a breakpoint into: `anonymous namespace'::UIElementFactoryManager::createUIElement while it is running, and work out what stack-trace is triggering that. It would be great to see why it is triggered multiple times etc. =) [ assuming that it is of course ]
Created attachment 131398 [details] LLDB UIElementFactoryManager Version: 5.4.0.0.alpha0+ Build ID: 273823de644f2086377795d3afb51a39d30bfeaa CPU Threads: 4; OS Version: Mac OS X 10.12.4; UI Render: default; Locale: en-US (en_US.UTF-8); Calc: group
Perhaps this would be obvious at this point but disabling the Sidebar from the View menu results in significantly reduced lag using the above example documents. Also worth noting is that disabling the Status Bar from the View menu results in further performance gains. Perhaps a related issue?
I don't think there's any super mystery here, the sidebar is just tearing down and recreating oodles of widgets on every context change. Some of the widgets are higher cost than others, so f.e. the color one might be quite heavy weight so it could be that reworking the palette loading would make it faster. Or not throwing away the widgets, just hiding them to avoid recreating them later is the way to go.
Surely the correct way to handle this is to avoid making the entire interface freeze whilst the widgets are processed. Can't this be handled asynchronously? i.e. the object is selected in the canvas and the user continue work whilst the widgets are processed and added to the Sidebar.
> Surely the correct way to handle this is to avoid making the entire interface > freeze whilst the widgets are processed. Can't this be handled asynchronously? I assume it is handled asynchronously - however, it is possible that that happens with too high a priority; and/or that we may need to improve prioritization of tasks to ensure that even if we hit 'idle' (ie. all tasks done) - that we don't allow a low priority task that last-time took <N> milliseconds to consume more than a certain budgeted time each second or so - to somehow push these guys off so they don't block event processing =) But of course - I could be wrong, and it could be handled synchronously; and - as Caolan says, prolly the easiest fix is profiling to find out why it is quite so slow. That's easy to do with a -non- dbgutil build, that has debugging symbols and callgrind/cachegrind =)
*** Bug 106588 has been marked as a duplicate of this bug. ***
Created attachment 132380 [details] Callgrind output from 5.4 I did the selection dance while callgrinding on Linux. I hope it helps. Arch Linux 64-bit, KDE Plasma 5 Version: 5.4.0.0.alpha0+ Build ID: 541b377a94fb1247dbf4c39b5bcf55deb8e5ef60 CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; Locale: fi-FI (fi_FI.UTF-8); Calc: group Built on March 31st 2016
*** Bug 107044 has been marked as a duplicate of this bug. ***
*** Bug 105428 has been marked as a duplicate of this bug. ***
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.
I worked with Telesto's attachment 129188 [details] in Windows, and posted a fix based on that. I'm not convinced this is the root of all the similar OSX issues, but we'll see. (Linux seemed to be unaffected) The majority of the lag was caused by reading the build id from a config file when doing a string id conversion, for each palette color. (or something like that) Please test again using a fresh daily build.
Aron Budea committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=910ead9c8344f32ba3d280a777306490aed5dac2 tdf#104312: add missing #include 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.
*** Bug 98132 has been marked as a duplicate of this bug. ***
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.
(In reply to Commit Notification from comment #36) > 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. This still doesn't appear to be fixed on OSX with LO5432, where there is still a noticeable lag between selection of an object and display of the object handles. In comparison, LO41 is lightning fast, with instantaneous display of the selection handlers. Tested on MacBookPro end-2013 Core i7 with 16Mb 1600 MHz DDR3 RAM ==> Re-opening
(In reply to Alex Thurgood from comment #37) There is still a open bug (bug 105500) for a lag introduced between 5.0.0.5 and 5.1.0.3. This report is only about the - fixed - regression introduced with the 5.3.0.0 branch. So the lag is probably caused by bug 105500 intensified by the poor MacOS performance which has something to do with the main-loop / idle handler re-work. See attachment 132593 [details], bug 106154.
so if this is a different problem with the same outcome can this be put back to fixed and open a new one ? otherwise its just like claiming the doctor didn't fix the patients broken leg the last time when he drove into a tree again
(In reply to Caolán McNamara from comment #39) > so if this is a different problem with the same outcome can this be put back > to fixed and open a new one ? otherwise its just like claiming the doctor > didn't fix the patients broken leg the last time when he drove into a tree > again I believe so.
*** Bug 105523 has been marked as a duplicate of this bug. ***
*** Bug 101990 has been marked as a duplicate of this bug. ***