jabref: Working with PostgreSQL database is unusably slow

JabRef version 4.31 on Ubuntu 16.04

Steps to reproduce the behavior:

  1. Connect to PostgreSQL db with ≈3,400 entries.
  2. See that it takes over 8 minutes the database has still not loaded completely.

This is on a very fast server. The Internet connection from here is only about 1 MB/s download. However, loading the same BibTeX file off a shared drive from the same server takes only a few seconds. Saving my 3,400 entries to the remote database also took hours and hours, and JabRef consumed something like 8 GB of memory while doing this.

Would it be worth trying a MySQL db instead?

Log File
Paste an excerpt of your log file here

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 51 (42 by maintainers)

Commits related to this issue

Most upvoted comments

@tobiasdiez I started writing the code to batch remove entries. I ended up changing EntryRemovedEvent to EntriesRemovedEvent and changing the code wherever it was subscribed to that event. It doesn’t compile because I haven’t finished. This is actually more of a refactoring of the entry events overall than specifically something that relates to database syncs. Also, I still have to look into if the tests need to be changed. I pushed it to a branch on my fork, linked below. Would you be interested in me making a PR for this?

https://github.com/NorwayMaple/jabref/commit/80e83772e77b2efc93f1b2715ae9106d463fd505

I think I figured out what the problem with trying to connect JabRef to Heroku Postgres is. It works out that Heroku does not negotiate with CA-verifiable certificates, but the Postgres JDBC wants to connect with sslmode set to verify-full. I am going to try another database.

Connecting to a remote PostGreSQL DB with ≈3,900 entries took 30 seconds for JabRef to show the entries in the window.

Exporting the same database as a *.bib file and opening this file from the same server (via mounted network share) using the same network connection took exactly the same time: 30 seconds.

So in response to my original problem, this is definitely a huge improvement! Thank you so much! It is well usable now! I apologize for my late response, as I have been totally overloaded at work.

For me, tests on the latest Windows built with a remote PostgreSQL server show the problem described in the issue is solved, but there are still many actions that remain slow:

  • Opening a DB: now fast (a few seconds for a few hundreds of entries)
  • Editing a field: still slow as I type the first character (~5 s), a bit faster for the second character, then it gets faster and good as I continue typing.
  • Pasting, in the BibTeX tab, an entry containing several fields: still very slow (1-2 min).
  • Switching tabs: takes a few seconds.