[Libreoffice-commits] core.git: bean/com
Noel Grandin
noel at peralex.com
Tue Jun 2 23:45:53 PDT 2015
bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 83f25d3c6e0918a1d29aa3a923b7f35f0b8a55e2
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jun 2 09:48:08 2015 +0200
reduce sleep when connecting to soffice from Java
500ms is an eternity on modern machines
Change-Id: I7f16935e9b09c734d05d2430dc0efb3be44617b8
Reviewed-on: https://gerrit.libreoffice.org/16038
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
index c6f6fa3..117ff39 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
@@ -318,22 +318,21 @@ public class LocalOfficeConnection
aSOffice.startupService();
// wait until soffice is started
- long nMaxMillis = System.currentTimeMillis() + 1000L*aSOffice.getStartupTime();
+ long nGiveUpTimeMillis = System.currentTimeMillis() + 1000L*aSOffice.getStartupTime();
while ( aInitialObject == null )
{
try
{
Thread.currentThread();
// try to connect to soffice
- Thread.sleep( 500 );
+ Thread.sleep( 100 );
aInitialObject = resolve(xLocalContext, mURL);
}
catch( com.sun.star.connection.NoConnectException aEx )
{
// soffice did not start in time
- if ( System.currentTimeMillis() > nMaxMillis )
+ if ( System.currentTimeMillis() > nGiveUpTimeMillis )
throw aEx;
-
}
}
}
More information about the Libreoffice-commits
mailing list