framework/source/helper/wakeupthread.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c41401adeb97de52df75ce55e17efc6d2d8c77d1
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Fri Aug 2 15:30:13 2024 +0100
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Mon Aug 5 18:52:32 2024 +0200

    lok: avoid excessive progress updates.
    
    Perhaps for desktop 40 updates per second can provide a nice smooth
    status experience for a full screen-width progress bar in some cases;
    but it seems likely that five per second over a remote protocol
    might be better.
    
    Change-Id: Ic77b3b76d680771cb766984bdbcd9c8af4af303d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171407
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/framework/source/helper/wakeupthread.cxx 
b/framework/source/helper/wakeupthread.cxx
index 63d52a82da76..d30742758a89 100644
--- a/framework/source/helper/wakeupthread.cxx
+++ b/framework/source/helper/wakeupthread.cxx
@@ -24,6 +24,7 @@
 #include <rtl/ref.hxx>
 #include <osl/thread.hxx>
 #include <salhelper/thread.hxx>
+#include <comphelper/lok.hxx>
 #include <condition_variable>
 #include <chrono>
 #include <vector>
@@ -62,10 +63,11 @@ public:
 
     void execute() override
     {
+        bool bLOK = comphelper::LibreOfficeKit::isActive();
         while (true)
         {
             std::unique_lock g(getMutex());
-            condition.wait_for(g, 25ms, [this] { return terminate; });
+            condition.wait_for(g, bLOK ? 200ms : 25ms, [this] { return 
terminate; });
             if (terminate || updatables.empty())
                 break;
 

Reply via email to