Bug 35023 - FILEOPEN Base functions extremely slowly with Java 1.6.0_20 and >1.6.0_24
Summary: FILEOPEN Base functions extremely slowly with Java 1.6.0_20 and >1.6.0_24
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Stephan Bergmann
URL:
Whiteboard:
Keywords:
: 42236 46009 (view as bug list)
Depends on:
Blocks: mab3.5
  Show dependency treegraph
 
Reported: 2011-03-04 10:33 UTC by Don
Modified: 2012-02-13 14:14 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Don 2011-03-04 10:33:08 UTC
I was using LibreOffice 3.3.0 and then upgraded 3.3.1. Base worked instantly in Ubuntu 10.10 with a quad core AMD 910 processor and 8 gigs of ram, It takes one core at 100% about 15 to 20 seconds to go from the first record in a form to the last record in a form in a realtively simple database with 2300 records. Apparently this is tied with the release of Java 1.6.0_24. Base worked fine with 1.6.0_22. It will not work properly with Java 1.6.0_20 either. This issue is in your forums. It also is affecting OpenOffice base in the same way according to information in the OpenOffice forums. I have my database on 4 different computers and the issue is on all of them with Ubuntu 10.10. It is significantly slower on the older, slower machines than what I stated above. It is also sluggish when pulling data from a database to do a mailmerge.
Comment 1 Alex Thurgood 2011-05-24 03:04:34 UTC
Hi Don,

Is this still the case, or has the problem now gone away, say, with further Ubuntu updates ?

Alex
Comment 2 Alex Thurgood 2011-05-24 03:05:40 UTC
It would also be good to test on a more recent version of LibreOffice. Version 3.3.2 is currently the stable, version 3.4 will be out soon and is currently in rc1.

Alex
Comment 3 Don 2011-05-24 05:32:29 UTC
Hi again,

I'm running 3.3.2 now on all my computers. When things got messed up was 
when Java went from version 6-22 to 6-24. When 3.3.4 is finalized I will 
upgrade to that. Also I'm using the version directly from LibreOfice, 
not the Ubuntu version.

Don

On 05/24/2011 06:05 AM, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=35023
>
> --- Comment #2 from Alex Thurgood<alex.thurgood@gmail.com>  2011-05-24 03:05:40 PDT ---
> It would also be good to test on a more recent version of LibreOffice. Version
> 3.3.2 is currently the stable, version 3.4 will be out soon and is currently in
> rc1.
>
> Alex
>
Comment 4 Don 2011-05-24 05:34:28 UTC
Hi Alex,

I've upgraded to Ubuntu 11.04. The same issue still persists. Sometimes 
on my most powerful computer it doesn't seem quite as bad. But base is 
far from working like it always used to. I've used it ever since it was 
part of OpenOffice. Would it make sense, or is it possible for 
LibreOffice to include a minimal java package with the download so 
LibreOffice is independent of anything java might mess up?.

Don

On 05/24/2011 06:04 AM, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=35023
>
> Alex Thurgood<alex.thurgood@gmail.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Keywords|                            |NEEDINFO
>
> --- Comment #1 from Alex Thurgood<alex.thurgood@gmail.com>  2011-05-24 03:04:34 PDT ---
> Hi Don,
>
> Is this still the case, or has the problem now gone away, say, with further
> Ubuntu updates ?
>
> Alex
>
Comment 5 Nico Dorn 2011-05-29 02:51:05 UTC
Bug confirmed for LibreOffice 3.3.2 on Ubuntu 10.10.
Java-Version: 6.24.

Because of this bug, base is barely usable. Some measurments I took on my machine with a single core 1.8Ghz processor:

Opening a table mit 1.500 entries takes about 30 seconds. Jumping to the last entry takes in the very same table takes anouther 2 minutes and 30 seconds.
Comment 6 Nico Dorn 2011-05-29 02:52:25 UTC
Bug confirmed for LibreOffice 3.3.2 on Ubuntu 10.10.
Java-Version: 6.24.

Because of this bug, base is barely usable. Some measurments I took on my machine with a single core 1.8Ghz processor:

Opening a table 1.500 entries takes about 30 seconds. Jumping to the last entry in the very same table takes another 2 minutes and 30 seconds.
Comment 7 Don't use this account, use tml@iki.fi 2011-05-30 01:51:21 UTC
Björn, lots of mentions of Ubuntu here, want to take this one? Feel free to assign back to list...
Comment 8 Nico Dorn 2011-07-14 03:33:51 UTC
The performance remains weak in 3.4.1, Java version 1.6.0_26.
Comment 9 Don 2011-07-14 08:17:29 UTC
I was so hopeful when the next update of Java from Java version 1.6.0_24 was released that it would make Base work like it had for many years. I'm running  completely updated Ubuntu 11.04 systems and presently LibreOffice 3.4.1 and the performance is still just as bad with Java version 1.6.0_26 as it was when Java version 1.6.0_24 was released. Would it not be possible for LibreOffice to ship with a basic java package included just for LibreOffice so these issues would not happen?
Comment 10 Alex Thurgood 2011-08-19 01:29:51 UTC
This has been confirmed multiple times on the users mailing list.


The only current workaraound is to downgrade the Java version to _u21 or _u22, both of which are unfortunately known to contain serious security issues.

There is a thread on the user mailing list which indicates how to have several versions of the Java environment installed on a Ubuntu machine and then be able to choose which version one wants to run with LibreOffice.

As the problem appears to lie with the JDK version and not LibreOffice as such, and there is a workaround, I'm setting this issue to resolved "not our bug".


Alex
Comment 11 John Talbut 2011-10-18 23:44:56 UTC
It is still not sure that this is a Java bug (it could be as a result of an intended change in Java) or what the the actual change in Java is that is causing the problem.

I have uploaded an strace at http://wiki.documentfoundation.org/File:Bug_35023_strace.log.7z for these operations:

Start  19:05
Open test.odb
Go to tables pane 19:06:22 - 19:06:40
Open table 19:07 - 19:08 (first show) - 19:08:45 (finish loading 1st page)
Maximise  19:09:07 - 19:09:35 (finish loading 1st page)
Go to last record 19:09:50 - 19:11:56
Comment 12 V Stuart Foote 2011-11-14 09:00:39 UTC
A continuing problem with Java 6 JRE, unclear if any improvement yet in 7 given problems of LO not recognizing JRE 7 on install or if selected as JRE.
Ref: https://bugs.freedesktop.org/show_bug.cgi?id=39659

Recent LO Dev forum exchanges:
http://nabble.documentfoundation.org/Trying-to-diagnose-base-running-extremely-slowly-tt3426499.html#none

And issue with Java stack guard as detailed in these Sun/Oracle Java related bug reports:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7024514
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6978641
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6929067
Comment 13 John Talbut 2011-12-14 22:58:59 UTC
This bug is certainly not resolved yet and it is a LibreOffice problem until we are sure that the problem has been correctly identified and solved.
Comment 14 Robert Großkopf 2011-12-18 06:09:58 UTC
*** Bug 42236 has been marked as a duplicate of this bug. ***
Comment 15 Björn Michaelsen 2011-12-23 13:25:19 UTC
Since all new unconfirmed bugs start in state UNCONFIRMED now and old unconfirmed bugs were moved to NEEDINFO with a explanatory comment, all bugs promoted above those bug states to NEW and later are automatically confirmed making the CONFIRMED whiteboard status redundant. Thus it will be removed.
Comment 16 Stephan Bergmann 2012-01-13 01:00:19 UTC
Fixed as <http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=cbc1ddba1bbe8843e0b31d39cb5c04f7b6518925> "Confine JDBC driver to thread-affine apartment for Java 6 performance."

From <http://nabble.documentfoundation.org/Trying-to-diagnose-base-running-extremely-slowly-tp3426499p3653136.html>:

"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.
Comment 17 tester8 2012-02-03 01:34:41 UTC
LibreOffice 3.5.0rc3
7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Ubuntu 10.04.3 x86
Linux 2.6.32-38-generic Russian UI

Now speed with 1.6.0_20 and 1.6.0_22 seems to be equal.
Comment 18 Rene Engelhard 2012-02-13 14:14:04 UTC
*** Bug 46009 has been marked as a duplicate of this bug. ***