jabref
jabref copied to clipboard
Performance issues with version 5.0 (example videos)
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.
- 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.
-
Comparison of JabRef search feature: 3.8.2: https://app.box.com/s/fgr84sgpsz6dscbnku91m5o2hhbf6rwt 5.0: https://app.box.com/s/fxwcska8dm5rlilv6a9mqswelkrqkh0t
-
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).
#5156
@AEgit the most recent developement version now includes the latest performance improvements. Could you please check what still needs improvement. Thanks!
@tobiasdiez Due to the issues with the current Windows installer (see https://github.com/JabRef/jabref/issues/5580#issue-520403252) and since the snap package on Linux also does not seem to work yet (see https://github.com/JabRef/jabref/issues/5417) I cannot test the current developer version, I am afraid.
The snap can be installed from https://builds.jabref.org/master/
It won't auto update and you need to install with --dangerous (since it's not from the store)
But for testing it can be done.
JabRef 5.0.0-dev--2019-11-17----151a216a2 Windows 10 10.0 amd64 Java 13.0.1
@tobiasdiez Tried the current dev version. This one is much improved in terms of performance. Switching between different groups and articles is now much smoother. Well done!
The following performance issues remain:
- Assigning an item to a group has a heavy impact on the CPU. Now, if you assign just a single item, this appears to be no major isse for a user with a powerful machine. I have a 6-core i7 and while the assignment of a single item brings the CPU usage to nearly 50% for a few seconds, the item appears (?) to be assigned immediately to this group (this might already be a problem, though, for people with weaker machines). What is a problem, however, is when you try to assign multiple items simultaneously to a new group. The CPU usage shoots up and (depending on how many items you try to assign to the group) JabRef freezes for some time. The CPU usage also stays high for a protracted time period: I am not sure, whether the items have already been assigned to the group as indicated by the item counter since the CPU usage stays high even after that for quite some time. To recreate this problem, try the following: a) Select multiple items in the main table b) Drag'n'drop them onto a group they had not be assigned to c) Observe the mentioned issues
- The same problem arises when you try to assign groups as subgroups of other groups (in fact, I think this feature might be bugged, but I have to test this more thoroughly). If you assign just a single group, things appear fine. But if you assign multiple groups simultaneously as subgroups to a new group (again, by using the drag'n'drop feature - but this time in the groups panel), you end up with a high CPU usage over a protracted period of time.
- When you select multiple groups in the groups panel simultaneously (using left click on the starting group and left click + SHIFT on the ending group), there is a noticeable delay until all groups are selected and the CPU usage shoots up again.
- There is a noticeable delay (a few seconds) when you select the "All entries" group until the respective items are shown in the main table. I reckon this is directly dependent on the number of entries assigned to a certain group, because this problem also appears to arise, when groups with a high entry count are selected (currently my "All entries" group contains nearly 20,000 items).
These are the performance issues I have observed so far. Nevertheless, again a big thanks to @tobiasdiez for the major performance improvements that the current version offers now - this is definitely a major step into the right direction.
Thanks for the feedback. I'll try to have a look at the remaining performance issues in the next days.
JabRef 5.0.0-dev--2019-11-24----8780a5632 Windows 10 10.0 amd64 Java 13.0.1
Note also, that it appears, as if the search has become slower again. Not as bad as it was in the past (https://github.com/JabRef/jabref/issues/2852), but it seems, that the latest versions have seen a performance decrease there as well. Entering a search term using a large database results in lagged input (similar to a low frame rate in a video game).
@tobiasdiez related to the add tab threading?
@AEgit We implemented some performance improvements recently. Can you please see if they might have fixed some of the issues you described in https://github.com/JabRef/jabref/issues/5071#issuecomment-554769666. Moreover, it would be good which of the remaining issues are critical, i.e. need to be fixed before we release 5.0. Thanks
JabRef 5.0-beta.354--2020-01-18--2612e22 Windows 10 10.0 amd64 Java 13.0.2
The new versions brings some improvements, but the problems are still too big for a release version. I will explain this in detail below (based on the issues reported in https://github.com/JabRef/jabref/issues/5071#issuecomment-554769666):
- Now, if you assign multiple items to a single group, JabRef still has a high CPU usage (60%) over a protracted period of time (several minutes!), but it does not freeze anymore. However, now another issue can be observed. Namely, the cycling through entry previews does not work while the CPU usage is high. When you try to go from an entry preview of one item to the next one, the next item will be selected in the main table (indicated by the blue marking), but the corresponding entry preview is not shown. Instead, the entry preview of the previously selected item is shown. This means, that for several minutes (until the CPU usage has dropped from the item assignment to a new group) it is NOT possible to see the entry previews of all entries (except for the one, that had been selected initially). I think this is a major problem, that needs to be fixed before release.
- The problem with high CPU usage over time, if you assign a group as a subgroup of another still persists and appears to be even worse than before. I have just tried to assign one group as subgroup of another and that assigned another group as the subgroup of the previous one, i. e. we end up with a 3-leveled order: group - subgroup - sub-subgroup In total, just two groups have been moved. Despite that, the CPU usage stayed high for several minutes (!). It might be, though, that this problem only appears, if issue 1 has been triggered first, since I have not been able to trigger this behaviour consistently.
- Issue 3 appears to be fixed.
- The delay mentioned in issue 4 has been much reduced (it is now less than a second, as far as I can tell).
- When you now make changes to group structure (e.g., assign two groups as the subgroup of another group) and then selected another group again, NO items at all are shown in the main table. This means, that a few changed to the group structure lead to a non-functional main table (it just remains empty).
- The slowed down search persists (see https://github.com/JabRef/jabref/issues/5071#issuecomment-557923718).
I wonder whether some of these performance issues could be solved by a simple workaround: Make it possible to switch off the calculation of the number of items in the groups. In version 3.8.2 this was possible and was also suggested to do, when having performance problems. Indeed, I switched it off for my database, since otherwise it would not be possible to work with the database due to performance problems. However, you shouldn't get rid of the background box surrounding the group item account. This box changes colour according to whether an item selected in the main table is part of a group or not, so this information should be available. In the old JabRef version this was achieved by having the name of a group underlined, which contained a selected item.
I have 10500ish entries; simply sorting the entry table by a column, e.g. title, takes typically several seconds.
JabRef 5.0--2020-03-08--93de138 Linux 5.5.7-200.fc31.x86_64 amd64 Java 13.0.2
Could you all please test with the latest development version? We upgraded to javafx14 which comes with an overall performance improvement. We still have to optimize some bottlenecks, but I personally noticed some performance increases
JabRef 5.1--2020-03-18--99183e1 Windows 10 10.0 amd64 Java 13.0.2
I am afraid, as mentioned previously (https://github.com/JabRef/jabref/issues/5510#issuecomment-590564792; https://github.com/JabRef/jabref/issues/5735#issuecomment-591904187), the performance is actually worse for me - it is so bad, that I cannot use my large database any more for bug testing.
JabRef 5.1--2020-03-18--99183e1 Linux 5.5.8-200.fc31.x86_64 amd64 Java 13.0.2
with approx 10600 entries
in the entry table, when I sort according to a column, the first time I click onto a column header, it can take 15-20 seconds to sort the entries. the second time, sorting in the opposite order, takes only a 3 seconds.
Side comment: For sharing screen recordings, loom was recommended to me. Then, everyone with a web browser can see the videos. (I got comments that some users could not see the videos above)
I would assume that this issue also covers search-as-you-type, where @hankstevens01 and @lc9275 reported that it is very slow:
- https://github.com/JabRef/jabref/pull/1100#issuecomment-601727917
- https://github.com/JabRef/jabref/pull/1100#issuecomment-603464324
Thus, I just list it here.
I found some Easter eggs in the code. After eating them JabRef now feels more slim and responsive. In fact, for me all the performance problems mentioned in this issue are fixed now.
@AEgit @ilippert @Codeberg-AsGithubAlternative-buhtz Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.
@koppor @tobiasdiez Is the snap --edge channel now updated on every commit to master?
JabRef 5.1--2020-04-10--d4396ce Linux 5.5.15-200.fc31.x86_64 amd64 Java 14
thanks for the note! this is my experience:
- sorting my 10600 entry file by title still takes 30 seconds (should be a basic entry table operation).
- after running jabref for about 2 minutes, jabref often hangs, being unresponsive.
- after running for 8 minutes, jabref has memory 1.7gb, virtual memory 91,2 gb, resident memory 1,8gb, shared memory 128mb
JabRef 5.1--2020-04-10--d4396ce Mac OS X 10.15.4 x86_64 Java 14
Database of 19800 refs
- 33 sec to open Jabref
- 34 sec to display typed search term, it then immediately displays results
On Sun, Apr 12, 2020 at 10:09 AM Ingmar Lippert [email protected] wrote:
JabRef 5.1--2020-04-10--d4396ce Linux 5.5.15-200.fc31.x86_64 amd64 Java 14
thanks for the note! this is my experience:
- sorting my 10600 entry file by title still takes 30 seconds (should be a basic entry table operation).
- after running jabref for about 2 minutes, jabref often hangs, being unresponsive.
- after running for 8 minutes, jabref has memory 1.7gb, virtual memory 91,2 gb, resident memory 1,8gb, shared memory 128mb
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JabRef/jabref/issues/5071#issuecomment-612620760, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVZLPEM7Q2WXNO3VXZKKF3RMHDSDANCNFSM4H2ZP5UA .
--
“Life is a garden, not a road. We enter and exit through the same gate. Wandering, where we go matters less than what we notice.” Dr. Hank Stevens Pronouns: he/his
Director, Ph.D. Program in Ecology, Evolution, and Environmental Biology https://miamioh.edu/cas/academics/programs/eeeb/
Associate Professor (lab website https://blogs.miamioh.edu/stevens-lab/)
Miami University | Department of Biology
433 Hughes Hall
Oxford, OH 45056 O: 513-529-4206 | [email protected] https://miamioh.edu//miami-tribe-relations/index.html Learn more about Miami Tribe Relations https://miamioh.edu//miami-tribe-relations/index.html
Sorry, the build has failed to upload the files. Please test the version from the run: https://github.com/JabRef/jabref/runs/580559222 (Top right corner, "Artifacts") (Unfortunately the github build system puts all versions for one os together in one archive)
sorry, I am not sure what you mean - I cannot find Artifacts at the linked page. I can find some at https://github.com/JabRef/jabref/actions/runs/76469953 - do you mean those?
@ilippert Yes, sorry, I had apparently linked the wrong run.
Sorry to disappoint ... first attempt to run
- memory 1,4gb, virtual memory 91,2b, resident memory 1,5gb, shared 135mb
- jabref was hanging/unresponsive whilst it was starting, I even got the system's warning. But then after a minute it was started up, so to say.
- typing in the search window initially worked perfectly swiftly
- then it slowed down: removing the search phrase slowed down jabref - no reaction of jabref for 30 seconds.
- sorting some columns (not all) takes 20+ seconds
"easter egg"? Can you please link the commit where it was removed? Does the "easter egg" will have any consequences for some persons and/or for the quality control process in the JabRef development?
Starting JabRef still cost to much time. But the issue with text entry is ok - for now.
@Codeberg-AsGithubAlternative-buhtz please don't take the word "easter egg" literally. It was meant as issue I the JabRef code. We are working hard to get students on board at JabRef development. See https://devdocs.jabref.org/teaching for details. At the linked page https://devdocs.jabref.org/getting-into-the-code/development-strategy you see that we take quality serious. Please don't fear that we "play around" with JabRef.
JabRef 5.1--2020-04-12--771af5d Windows 10 10.0 amd64 Java 14
@tobiasdiez : Thank you very much! This is, indeed, a nice "easter egg". Many of the previous performance issues have now either disappeared or are much less pronounced, than they were before.
I will list here the issues that appear to remain, mainly based on comment https://github.com/JabRef/jabref/issues/5071#issuecomment-575912921:
- Has basically disappeared. If you assign multiple items to a group, CPU usage might shoot up, but it will only be for a few sec.
- Has disappeared if you only assign small groups (i. e. containing a few subgroups/items). If you re-assign large groups (with thousands of subgroups/items) as a new subgroup to another group, the problem persists (but is less prominent than it was before). If such a large group is re-assigned CPU usage shoots up for 10 to 30 sec. The cycling through entry previews does not work while the CPU usage is high. When you try to go from an entry preview of one item to the next one, the next item will be selected in the main table (indicated by the blue marking), but the corresponding entry preview is not shown. Instead, the entry preview of the previously selected item is shown. This means, that for up to 30 sec (until the CPU usage has dropped from the item assignment to a new group - depending on the size of the group) it is NOT possible to see the entry previews of all entries (except for the one, that had been selected initially). Is this something that can be improved? It is now much better than it was before (with several minutes of waiting time even for small groups), but maybe it can be improved even more?
- Issue 3 is fixed, as mentioned previously.
- The delay mentioned in issue 4 (when selecting "All entries") is still less than a second (so people might be ok with it).
- Issue 5 sometimes appears, but I have not managed so far to create a reproducible example.
- The search is fast again for me (after having conducted the first search).
Additionally:
- Opening JabRef the first time takes about 30 sec with my large database. During that time there is a high CPU load, but after that JabRef is quite responsive.
- Turning off the item count in the groups panel increases performance (though not as much, as I expected).
- Opening an old JabRef database (e.g., one form version 3.8.2) takes longer than opening a database that has been stored in v. 5 format. But it is by far not as bad, as it was in the past (https://github.com/JabRef/jabref/issues/5735#issuecomment-564566440). Similarly, opening an older database also requires more RAM (same database in 3.8.2 vs. 5.1: ca. 3.5 GB vs. ca. 2 GB).
These changes are a major step forward! Well done. I reckon once these minor issues are solved and when the floating mode is re-implemented (https://github.com/JabRef/jabref/issues/4237) I can finally move from version 3.8.2 to version 5.1 for my working environment.
@ilippert @AEgit thanks for the feedback.
Not sure whether to report this here, or as a new bug. I just deleted about 2000 entries from my 10600 entry database. It took about 4 minutes to complete this operation, meanwhile jabref was not useable.
JabRef 5.1--2020-05-04--7bb1e24 Linux 5.6.8-200.fc31.x86_64 amd64 Java 14.0.1
JabRef 5.1--2020-05-04--b5599c9 Windows 10 10.0 amd64 Java 14.0.1
Can confirm the issue reported by @ilippert (https://github.com/JabRef/jabref/issues/5071#issuecomment-624058022). I just tried to delete >7,000 entries from a database with >20,000 entries. It took several minutes during which JabRef was not responsive so ultimately I decided to force shutdown JabRef since it seem to take way too long.