JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.54k stars 2.47k forks source link

Performance issues with version 5.0 (example videos) #5071

Open AEgit opened 5 years ago

AEgit commented 5 years ago

JabRef 3.8.2 windows 10 10.0 amd64 Java 1.8.0_211

VS

JabRef 5.0-dev--snapshot--2019-06-20--master--6265e2460 Windows 10 10.0 amd64 Java 1.8.0_211

As announced previously (https://github.com/JabRef/jabref/issues/4430#issuecomment-504119679), here I add some videos that showcase the performance difference between JabRef 3.8.2 vs. JabRef 5.0 when working with a large database (> 18,000 entries) and several thousand static groups.

These issues have been reported previously, but I thought it would be better to create a new bug report instead of adding the videos to just one of these previous reports (they should apply to all of them, I reckon). Previous reports of issues with the performance include (among others), the following:

https://github.com/JabRef/jabref/issues/4430 https://github.com/JabRef/jabref/issues/4756 https://github.com/JabRef/jabref/issues/4526

Note, that I had to run these tests on a virtual machine, since I do not have a full license for YourKit Java Profiler and had to use a test license (since the test license I had on my actual machine is no longer valid). So the performance on an actual machine should be slightly better (the virtual machine is running on a SSD, and I assigned two cores of a Core i7 Hexacore and 8 GB of 32 GB of RAM to the virtual machine), but the relative performance difference between version 3.8.2 and version 5.0 should be comparable. In fact, my impression is that this setup favours version 5.0 because 3.8.2 appears slower in the virtual machine than in a non-virtualized setting. Version 5.0 on the other hand, is equally slow in a virtual machine and when running on the actual hardware.

Note, that I use the same database when comparing the two versions. The only difference is, that the database in version 5.0 has been saved using version 5.0 (while the other one is still using a database in 3.8.2 format). This allows for better comparison, since version 5.0 stores groups differently.

  1. Comparison of first start of JabRef: 3.8.2: https://app.box.com/s/7agrhreojpk85itl9dvsz7mx8ueaydcl 5.0: https://app.box.com/s/79dqowjer214qdi0wiceh03x9g4iuexi

Note, that version 5.0 sometimes seems to have crashed. Furthermore, I did not immediately click onto 3.8.2 when it was actually already ready.

  1. Comparison of JabRef search feature: 3.8.2: https://app.box.com/s/fgr84sgpsz6dscbnku91m5o2hhbf6rwt 5.0: https://app.box.com/s/fxwcska8dm5rlilv6a9mqswelkrqkh0t

  2. Comparison of working with JabRef groups: 3.8.2: https://app.box.com/s/fc5ku29f39o9r7h86hj309tao4uifo8o 5.0: https://app.box.com/s/cubdi2vvmzjnj5i7rtn57lfxp24kvzb9

Note, how JabRef freezes several times in version 5.0 when using certain groups features (e.g., assigning an item to a group, assigning a group as a new subgroup, ....). Sometimes it appears as if nothing is happening in the video, but it is actually just JabRef freezing from time to time. Note, the big differences in the time that JabRef spents on some actions (see YourKit Java Profiler). For certain actions, JabRef 5.0 will take much much longer than 3.8.2 (which translates into higher CPU demands).

ThiloteE commented 2 years ago

Instead of reporting your findings with regard to performance here directly, in future I would ask you to create separate issues for issues that have previously been mentioned in this thread, but still have not been solved and then link to this issue here.

With this workflow, we can more easily ignore issues that have already been solved and it saves us all the time to re-read walls of text over and over again :)) Thaaanks in advance :)

koppor commented 2 years ago

IMHO, the main issue that our main table is tightly coupled with the data of the BibDatabase: We load all data into memory and work in the in memory representation with Java and JavaFX data structures.

"Fix" in the medium way:

"Good architecture" fix:

Use an embedded database to provide pre-calculated views, indexing, search, ...