-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
shortDOI formatter is very slow #10589
Copy link
Copy link
Closed
Labels
[outdated] type: bugConfirmed bugs or reports that are very likely to be bugsConfirmed bugs or reports that are very likely to be bugsdev: performancegood first issueAn issue intended for project-newcomers. Varies in difficulty.An issue intended for project-newcomers. Varies in difficulty.
Metadata
Metadata
Assignees
Labels
[outdated] type: bugConfirmed bugs or reports that are very likely to be bugsConfirmed bugs or reports that are very likely to be bugsdev: performancegood first issueAn issue intended for project-newcomers. Varies in difficulty.An issue intended for project-newcomers. Varies in difficulty.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Done
StatusShow more project fields
Done
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?