-
-
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
shortDOI formatter is very slow #10589
Comments
Thanks for the report and your analysis. Sounds like a good idea. Solution: check if the DOI starts with the Pattern 10/[a-z]+ should be sufficient. For future: |
Hello, could I work on this? Thank you. |
Although the shortDOI website says that shortDOI's are "of the form 10/abcde", the "abcde" part often contains numbers as well (e.g. |
In one of my libraries, which contains approx 100 DOI entries, having the shortDOI field formatter active noticeably slows down the time it takes to save the library.
It takes <1 second to save without said formatter, but 30-40 seconds with, during which JabRef becomes unresponsive. This happens on every save, even when all DOI fields are already in the shortDOI format.
jabref/src/main/java/org/jabref/logic/formatter/bibtexfields/ShortenDOIFormatter.java
Lines 28 to 40 in d6a0e59
jabref/src/main/java/org/jabref/logic/importer/util/ShortDOIService.java
Lines 30 to 35 in d6a0e59
If I interpret the above pieces of code correctly, the formatter always makes a request to the shortDOI service, even if the DOI is already shortened. Would it be possible to first check if the DOI is already shortened (i.e. starts with "10/"), and only make a request if it is not?
The text was updated successfully, but these errors were encountered: