[SCM] LibreOffice packaging repository branch, debian-experimental-3.5, updated. libreoffice_3.5.0_beta2-2-41-gf5608ff
The following commit has been merged in the debian-experimental-3.5 branch:
commit 1c214ac9fd7e3df1e9e97b7f978fb96da7f4512e
Author: Rene Engelhard <rene@debian.org>
Date: Fri Jan 13 10:30:53 2012 +0100
backport fix for ttach/Detach-CurrentThread slowness from libreoffice-3-5
diff --git a/changelog b/changelog
index 8c2fc4e..48f59b5 100644
--- a/changelog
+++ b/changelog
@@ -6,6 +6,9 @@ libreoffice (1:3.5.0~beta3-1) UNRELEASED; urgency=low
* debian/patches/revert-468fe685e3c58c84bce6d9a48b931dcc21682679.diff:
fix armhf build in bridges...
* debian/patches/ppc-fix-soffice.sh.diff: make soffice.sh on ppc correct
+ * debian/patches/jdbc-driver-threading.diff: backport fix for
+ Attach/Detach-CurrentThread slowness from libreoffice-3-5
+ (closes: #644957)
* debian/libreoffice-core.preinst.in:
- rm -f /var/lib/libreoffice/basis3.4/program/services.rdb on upgrade
@@ -23,7 +26,7 @@ libreoffice (1:3.5.0~beta3-1) UNRELEASED; urgency=low
- no dependencies needed for full builds
+ propagate gb_FULLDEPS
- -- Rene Engelhard <rene@debian.org> Wed, 11 Jan 2012 23:05:52 +0000
+ -- Rene Engelhard <rene@debian.org> Fri, 13 Jan 2012 10:22:35 +0100
libreoffice (1:3.5.0~beta2-2) experimental; urgency=low
diff --git a/patches/jdbc-driver-threading.diff b/patches/jdbc-driver-threading.diff
new file mode 100644
index 0000000..0205d44
--- /dev/null
+++ b/patches/jdbc-driver-threading.diff
@@ -0,0 +1,62 @@
+From cbc1ddba1bbe8843e0b31d39cb5c04f7b6518925 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Fri, 13 Jan 2012 08:38:07 +0000
+Subject: Confine JDBC driver to thread-affine apartment for Java 6 performance
+
+... so that the massive number of the JDBC driver's calls to JNI Attach/Detach-
+CurrentThread are guaranteed not to happen on the main thread (where they are
+extremely expensive, see
+<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6978641> "Fix for 6929067
+introduces additional overhead in thread creation/termination paths").
+
+(cherry picked from commit bb59742bcf4883af5876a2ffadcc4a689e414b60)
+---
+diff --git a/connectivity/source/drivers/jdbc/exports.dxp b/connectivity/source/drivers/jdbc/exports.dxp
+index 7003307..f0e1c69 100755
+--- a/connectivity/source/drivers/jdbc/exports.dxp
++++ b/connectivity/source/drivers/jdbc/exports.dxp
+@@ -1 +1,2 @@
++component_getImplementationEnvironment
+ component_getFactory
+diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx
+index 59c73ff..85df771 100644
+--- a/connectivity/source/drivers/jdbc/jservices.cxx
++++ b/connectivity/source/drivers/jdbc/jservices.cxx
+@@ -83,7 +83,21 @@ struct ProviderRequest
+ void* getProvider() const { return xRet.get(); }
+ };
+
+-//---------------------------------------------------------------------------------------
++extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
++component_getImplementationEnvironment(
++ char const ** ppEnvTypeName, uno_Environment **)
++{
++ // Recent Java 6 VMs make calls to JNI Attach/DetachCurrentThread (which
++ // this code does extensively) very expensive. A follow-up JVM fix reduced
++ // the overhead significantly again for all threads but the main thread. So
++ // a quick hack to improve performance of this component again is to confine
++ // it in the affine apartment (where all code will run on a single,
++ // dedicated thread that is guaranteed no to be the main thread). However,
++ // a better fix would still be to redesign the code so that it does not call
++ // Attach/DetachCurrentThread so frequently:
++ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ":affine";
++}
++
+ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
+ const sal_Char* pImplementationName,
+ void* pServiceManager,
+diff --git a/connectivity/source/drivers/jdbc/makefile.mk b/connectivity/source/drivers/jdbc/makefile.mk
+index befdc73..4229c8f 100755
+--- a/connectivity/source/drivers/jdbc/makefile.mk
++++ b/connectivity/source/drivers/jdbc/makefile.mk
+@@ -78,8 +78,6 @@ SLOFILES=\
+ $(SLO)$/tools.obj \
+ $(SLO)$/ContextClassLoader.obj
+
+-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
+-
+ # --- Library -----------------------------------
+
+ SHL1TARGET= $(JDBC_TARGET)$(DLLPOSTFIX)
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/patches/series b/patches/series
index 857888f..454f45c 100644
--- a/patches/series
+++ b/patches/series
@@ -27,3 +27,4 @@ add-debian-multiarch-support.diff
revert-468fe685e3c58c84bce6d9a48b931dcc21682679.diff
propagate-gb_FULLDEPS.diff
ppc-fix-soffice.sh.diff
+jdbc-driver-threading.diff
--
LibreOffice packaging repository
Reply to: