-
-
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
Prevent the EventBus from triggering searches #10619
Conversation
|
Ok. Almost nothing works because,
Next attempts,
|
We might have done searches twice before, doubt it but verify |
I think I have cracked the JavaFX way of solving this! We need MORE bindings and observables!!!!!!!!!! 😲
|
While the PR was in progress, JabRef released a new version. You have to merge It might also be that another CHANGELOG.md issue arose. You can check the detailed error output at the tab "Checks", section "Tests" (on the left), subsection "CHANGELOG.md". |
What can trigger filtering on the complete list? A field modification? Searchbar behavior options:
|
Based on recent activity in the issue, @gianlucabaldassarre @teertinker @ytzemih @m-mauersberger could any of you try if the problem is reduced in the latest build of this PR? At the time of writing it is this one. Beware that there might be bugs and odd behaviors, preferably backup your library before trying. Note that the changes to the filtering behavior are unlikely to be done by the time you try it, but hopefully, there will be some performance improvements. |
Thanks, @k3KAW8Pnf7mkmdSMPHz27 for taking care of this issue. I tried the PR, you pointed me to, and it seems as if the problem is fixed. Editing an entry can be done without delayed typing while the search field is non-empty (i.e. the search filter is active). Looking forward to seeing this transferred to the next stable release. Thanks again. Hope others can confirm my observation. |
Hey, I did try it on my slowest machine. It works very well. A great improvement for me. |
I am suspecting
Is incorrect. I'll look into it a bit later, I don't have any experience with heylogs, and IMO the changelog is correct. |
I've added an observation #8977 (comment) that may be relevant to the handling of this PR. |
Please also test with multiple open libraries. We need to make sure that the global search and the search across libraries also still works |
@Siedlerchr, I did. I'm usually using 4-6 databases at the same time. Whether or not global search is on does not make much difference (both works btw.) but what really is a show stopper, particularly, in large databases is when the renderer has to render an entry with some text in the "abstract" and/or "comment" field. I'm making comments a lot, increasingly also with itemized lists. So, JR's speed seems to negatively correlate with DB size and use of abstract/comment field in entries. I can imagine, if each single key stroke triggers a regexp search in a large database and(!) a (markdown-capable?) entry renderer, there is a hell lot going on. |
Working with multiple libraries works for me without any problems. Global search works as expected. I can't see any difference with regard to search to the stable version. I did also try to edit a small database with search on/off. I did not experience any issues. Jabref was responsive and fast. |
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build. |
Fixes a performance problem while editing a BibEntry while sorting/filtering the maintable
A few months ago, we discussed a replacement for the EventBus, and I believe we didn't disagree that JavaFX has largely usurped its role.
The performance issue is most likely that the events on the EventBus triggered a full search AND filtering on every update.
This PR removes the EventBus code, as the same functionality is implemented using JavaFX.
While I haven't verified that this is the case, in theory, the JavaFX code is more efficient and doesn't require full filtering and sorting of the MainTable on every change.
At worst, the changes should be twice as fast. At best, it is a lot faster.
Resolves #8977.
Todo
Can I write tests for this? 😀Don't filter the entries if the search query isn't updated (statemanager.setSearchQuery
).equal
. If we want this we should onboard Lombok or a similar tool.FxTimer.create(Duration.ofMillis(400), _)
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)