[Libreoffice-commits] core.git: Branch 'private/kohei/4-2-data-stream-staging' - sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Fri Dec 20 09:58:54 PST 2013


 sc/source/ui/docshell/datastream.cxx |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

New commits:
commit 9ac968ebe8743ffedf6c8114826711859d0563f8
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Dec 20 12:56:17 2013 -0500

    Call Yield() to unblock the main thread when refreshing.
    
    Also, we don't seem to need this solar mutex locking and checking for
    needs repaint flag here anymore, and not having these make the streaming
    much faster esp on Windows.
    
    Change-Id: I6e8ae82e5d986492ac576d28f11e2afffe954bc2

diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 8f6f501..27a5991 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -65,15 +65,11 @@ private:
     {
         while (!mbTerminate)
         {
-            // wait for a small amount of time, so that
-            // painting methods have a chance to be called.
-            // And also to make UI more responsive.
-            TimeValue const aTime = {0, 100000};
             maStart.wait();
             maStart.reset();
             if (!mbTerminate)
                 while (mpDataStream->ImportData())
-                    wait(aTime);
+                    ;
         };
     }
 };
@@ -352,6 +348,7 @@ void DataStream::SetRefreshOnEmptyLine( bool bVal )
 void DataStream::Refresh()
 {
     // Hard recalc will repaint the grid area.
+    Application::Yield();
     mpDocShell->DoHardRecalc(true);
     mpDocShell->SetDocumentModified(true);
 
@@ -516,14 +513,10 @@ void DataStream::Text2Doc() {}
 
 bool DataStream::ImportData()
 {
-    SolarMutexGuard aGuard;
     if (!mbValuesInLine)
         // We no longer support this mode. To be deleted later.
         return false;
 
-    if (ScDocShell::GetViewData()->GetViewShell()->NeedsRepaint())
-        return mbRunning;
-
     Text2Doc();
     return mbRunning;
 }


More information about the Libreoffice-commits mailing list