"One rather easy fix would be to confine the
com.sun.star.comp.sdbc.JDBCDriver UNO code to a thread-affine apartment,
see the attached patch. That way, all code related to this UNO service
(which is the code that calls Attach/DetachCurrentThread so frequently
and thus causes the performance degradation) is run in a single,
dedicated thread.
"That thread is guaranteed not to be the main thread (as the
thread-affine apartment explicitly creates it), so JVM versions that
include the fix for
<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6978641> 'Fix for
6929067 introduces additional overhead in thread creation/termination
paths' (which significantly reduces the overhead of
Attach/DetachCurrentThread for all but the main thread again) should
return to an acceptable performance. Trying it out on Fedora 16, which
includes version 1.6.0_22 of OpenJDK, the patch noticeably improves
performance of the test scenario described at
<https://bugzilla.redhat.com/show_bug.cgi?id=661738#c0>.
[...]
"I did not find problems with using the thread-affine apartment, but then
again my Base skills are virtually non-existent, so this would probably
need some QA. However, there is also already another SDBC driver that
uses the thread-affine apartment, namely the Windows-specific ADO driver
(com.sun.star.comp.sdbc.ado.ODriver)."
So, please somebody QA the Base JDBC driver thoroughly.
Fixed as <http:// cgit.freedeskto p.org/libreoffi ce/core/ commit/ ?h=libreoffice- 3-5&id= cbc1ddba1bbe884 3e0b31d39cb5c04 f7b6518925> "Confine JDBC driver to thread-affine apartment for Java 6 performance."
From <http:// nabble. documentfoundat ion.org/ Trying- to-diagnose- base-running- extremely- slowly- tp3426499p36531 36.html>:
"One rather easy fix would be to confine the star.comp. sdbc.JDBCDriver UNO code to a thread-affine apartment, DetachCurrentTh read so frequently
com.sun.
see the attached patch. That way, all code related to this UNO service
(which is the code that calls Attach/
and thus causes the performance degradation) is run in a single,
dedicated thread.
"That thread is guaranteed not to be the main thread (as the bugs.sun. com/bugdatabase /view_bug. do?bug_ id=6978641> 'Fix for termination DetachCurrentTh read for all but the main thread again) should /bugzilla. redhat. com/show_ bug.cgi? id=661738# c0>.
thread-affine apartment explicitly creates it), so JVM versions that
include the fix for
<http://
6929067 introduces additional overhead in thread creation/
paths' (which significantly reduces the overhead of
Attach/
return to an acceptable performance. Trying it out on Fedora 16, which
includes version 1.6.0_22 of OpenJDK, the patch noticeably improves
performance of the test scenario described at
<https:/
[...]
"I did not find problems with using the thread-affine apartment, but then star.comp. sdbc.ado. ODriver) ."
again my Base skills are virtually non-existent, so this would probably
need some QA. However, there is also already another SDBC driver that
uses the thread-affine apartment, namely the Windows-specific ADO driver
(com.sun.
So, please somebody QA the Base JDBC driver thoroughly.