-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The process of typing into fields is too slow in a large database. Caused by sorting columns in main table. #8977
Comments
meta-issue: #8906 |
JabRef 5.8--2022-08-16--6a71395 If I may, I would suggest this is a very serious bug - as it is likely to prevent users from actually utilising JabRef to make extensive notes on their literature, which surely is a key reason to use JabRef (imho). |
JabRef 5.8--2022-08-29--eff7e65 Work around for me: type in notes on literature in an external pure text editor, then copy & paste in JabRef. Works very well. To me, this reveals: the problem is not the amount of text but the typing. |
@ilippert Do you have autocomplete enabled or some save actions configured or maybe update of timestamp (modification date)? |
no.
yes, I have update timestamp modificationdate activated.
Indeed, when I deactivate |
JabRef 5.8--2022-09-04--f240f6d However, in this version, when both |
Is Autosaving enabled? I wonder if the backup manager produces these issues. But it might be also some weird java thing. What linux os are you using again? Arch? |
Fedora 36 |
Meanwhile on Autosaving is still disabled, as is timestamp on modification. Timestamp on creationdate is active however. The problem still appears. seemingly, if both timestamp options are disabled, the problem does not appear. |
Maybe this issue has something to do with large databases? On a new database with new entries, I can type seemingly properly. But there are serious delays in a new entry of a database with >8000 entries. In a similar way as @ilippert, I am creating new entries in a new local database and copy&paste it to the large database. |
Now I am on |
I can confirm this issue (i.e., very slow typing) whenever I'm using search for filtering the database (i.e. having some text in the search field) and edit some entries in the search result. My solution:
Perhaps, programmatically, there is some way to reduce the "update dependency" by relaxing the "search update trigger" of the search field and the "update notification publisher" in the entry editor. (Please, excuse my uninformed jargon, I'm not too familiar with JR's GUI framework. On a side note, it occurs to me that the "update notification" in the entry editor would be good to implement some delay, |
JabRef has some delay as it waits for major changes after typing: CoarseChangeFilter is responsible for this |
@Siedlerchr Hmm, sounds like that filter could solve the issue. Or, are you saying this is already implemented? In my JR installation it appears as if each key stroke triggers a new search as well as a new rendering of the preview pane. So, there is quite a bit to deal with after each stroke. |
For searching, we only have a small delay and there is no filter, search is instant, so whenever the content of the search field changed the search is restarted jabref/src/main/java/org/jabref/gui/search/GlobalSearchBar.java Lines 202 to 209 in e7f55d9
|
I see, ok. While this behaviour after changing content in the search bar itself is totally reasonable, typing in a field of the entry editor (e.g., changing the content of the comment field in the entry editor) should perhaps not lead to instant searches or preview renderings after each key stroke. Hope that makes sense. |
JabRef 5.10--2023-07-04--ffedea2 no surprise, issue persists on different hardware configuration. |
Today I tried to reproduce with my 100 000 entries database and I can confirm. It is slightly slow, but not all too slow. (0.1-1 second laggs. Whatever you type will show up, albeit slightly late). I assume, because my CPU was not always completely maxed out, it is still bearable. I can confirm that the issue is caused by high CPU. RAM stays constant. Tests were done with Windows Task Manager and changing the CPU window to "logical processors". While typing, 6 of my cores (6 core cpu, 12 threads) show a significant spike: For developers, this seems worth fixing. |
JabRef 100.0.0 Surprisingly, with my old laptop, which features a very weak Intel Pentium N3540, the process of typing into fields feels very similar to what it feels like on my windows machine with the way more powerful Ryzen 5 5600. This makes me believe, this is not as hardware dependent as I initially thought and better hardware may only marginally contribute to fixing this problem. |
In the newest development version from today (2023-09-06), it takes a few minutes, but then a typing into fields is lightning fast on my ryzen 5600 and with the 100 000 entries library. Something must have changed. |
Never mind! It is still slow, but I found some conditions. Here is how you can reproduce it:
here is the library file: |
Another way how to reproduce:
Also, the time it takes to search something feels similar to the time it takes to switch libraries or to type into fields. |
Once you sort from low --> high, search stays slow, but switching between libraries and typing into fields becomes fast. |
Hello, I just want to report, that I am bothered by the same problem. Typing in the editor is often so slow, that it hurts. Sometimes, the cursor addionally jumps to the first position. than I have to start all over again. For some years I kept using JabRef 4.x because of these performance issues. At some time I switched to the most current Version of JabRef because there are so many great features. I am not sure yet, wether this was a clever move. I have an ThinkPad I7 with 8GB RAM (Win10). So performance must not be a problem. Today I accidentally found out that clearing the search field leads to a much faster process. Before that, I tried different modifications of the settings, just to get Jabref to work properly (disable: fulltextsearch, disable autocompletion, close groups -> all of these nice options, I really would like to keep). This bug report gives some further hints (creationdate && sorting order). While I may try them for a better experience, it is definitely not a solution to create a complex set of settings just for the sake, to be able to enter characters into a textfield. |
Thank you for letting us know. The hope is then #8963 could fix something. However, I don't really think so, because the whole performance thing is about JavaFX and we do data processing in-memory without optimizations. |
JabRef 5.11--2023-10-21--affb6ac I had the same issue with my JabRef terribly slowing down, and sometimes crushing, when typing in the fields.
So it seems the search field is the cause of the problem (at least in my case). I have to say that in the past I did not understand the problem for years (for some time I used the an old version of JabRef to avoid the problem). So I was very glad to discover the trick above few days ago after years of suffering! Probably I did not understand that the problem was the search field because I did not expect such a fundamental feature could cause issues. I do not know if this might help. Wouldn't it be possible to add a button aside the search field so that the search is done only when pressing it, or when pressing , rather than having the continuous search? (...or any another solution, of course). |
I have no idea about the backend of the search engine. But wouldn't it be possible, that the search routine is only called, when there is any cursor activity in the search field? |
Thanks, @gianlucabaldassarre for confirming the issue, which btw. is still present in a three week old snapshot. @teertinker, as suggested in #8977 (comment), my impression really is that there is a connection between the fields in the entry editor and the search field/trigger. And, indeed, that behaviour is quite disruptive with larger databases, from a user point of view. But, certainly, it seems it is far less trivial to fix programmatically. Moreover, I suppose that a large fraction of JR users have comparatively small databases where the problem is less apparent... In fact, I can confirm that with one database with around 200ish entries, it barely shows on my machine. |
I am facing the same issue described in the previous comments: slow editing when search is "enabled". Thanks for the hints in There were some efforts about only syncing changes in field contents that were greater than 1 (i.e. copying something or deleting characters after selecting them, see #6663). Maybe a solution could look like that? Alternatively, a search button - that is also triggered by return key for an efficient workflow - would be a good option in my opinion as well. |
Perhaps, it's too far fetched, but what about triggering "search" only when leaving the bibentry editor, e.g., by clicking on another entry in the list or on a group in the group pane? Basically "on change of focus". Also, when editing an entry, only undesired things can happen anyway, such as the entry is taken from the list, and other entries are not even touched when not loaded in the entry editor. So, the only relevant change that can happen during editing an entry is that it's taken off the list and that is quite irrelevant, I'd guess. |
We are currently discussing this as well and will probably remove the EntryChangedListener and see if this works better. This would prevent re-triggering the search every time. The only little drawback I see, changed entry (if it no longer matches the search, e.g. author changed from a to b) would still be shown until the search is manualy redone. |
We are looking at removing the update to the search results on editing changes, and see if that resolves the performance problem.
That is probably the best solution 😁 |
Thanks, @Siedlerchr and @k3KAW8Pnf7mkmdSMPHz27 , well, sounds like there is reasonable solution with some small, perhaps negligible, drawback. |
Dear JabRef developers. Thank you so much for being so responsive. There aren't many software projects, that take hick'ups so serious and are so fast in improving the situation. |
I'd like to provide another observation that suggests this problem not to be solved entirely: So, while reducing search triggers indeed improved editing in large databases for me, interestingly, editing entries in quite small databases can still be quite slow because of the entry rendering (the pane to the right of the entry form) being triggered at each key stroke. My uninformed guess: It seems as if there are too many things (search, entry rendering, group admin, etc.) listening too often to too many events going on on the event bus. I'm currently using:
|
@Siedlerchr, my pleasure. Thanks to you all for taking care of this issue and also for opening new one based on my comment. |
I am glad one performance bottleneck seemingly has been eradicated, but the issue I described in #8977 (comment) is still there. Typing into fields is still slow when a column in the main table is sorted in reverse, hence I am reopening. |
True, but this can also be beneficial. For example, I add personal keywords to the |
JabRef 5.16--2024-07-24--d8ebffc still facing this issue |
@ilippert How can I reproduce the issue? |
JabRef 5.7--2022-06-12--e3b2ab2
Linux 5.17.13-300.fc36.x86_64 amd64
Java 18.0.1
JavaFX unknown
I am quite happy with the performance, however,
Originally posted by @ilippert in #5071 (comment)
The text was updated successfully, but these errors were encountered: