Skip to content

Fix issue #11189 - Implement a caching solution with local storage for citation relations #11845

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
3785cb1
Refactor Citations Relations Tab (#11189)
alexandre-cremieux Sep 19, 2024
8048da8
Refactor Citations Relations Tab (#11189)
alexandre-cremieux Sep 24, 2024
18db75e
Refactor Citations Relations Service Layer (#11189)
alexandre-cremieux Sep 28, 2024
0e9de3c
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
koppor Oct 10, 2024
9a31735
Address PR comments (#11901)
alexandre-cremieux Nov 6, 2024
b1133d0
MVStore implementation for citations: first approach (wip for open di…
alexandre-cremieux Nov 11, 2024
6a8b21b
Introduce the DAO layer for relations (#11189):
alexandre-cremieux Nov 17, 2024
01f6da4
MVStoreDAO implementation for citations relations (#11189):
alexandre-cremieux Nov 17, 2024
337780d
Implement a search lock mechanism for citations relations (#11189):
alexandre-cremieux Nov 24, 2024
7c2e32d
Avoid user to force update citation relations even the fetcher return…
alexandre-cremieux Nov 27, 2024
187b5d4
Make the citation relations update automatic after the guard delay is…
alexandre-cremieux Dec 8, 2024
b71d9fc
SearchCitationsRelationsService as singleton
Jan 11, 2025
dda21ed
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Jan 20, 2025
077e9ca
Update failing tests after merge
Jan 20, 2025
0bff913
Clean code style according to checkstyle
Jan 20, 2025
ea36f1a
Clean code style according to checkstyle
Jan 20, 2025
d7f9c2d
Fix pending PR comments
Jan 20, 2025
97b38c6
Fix null pointer exception in CitationsRelationsTab
Jan 22, 2025
54e7e21
Add settings for Citations relations store TTL
Jan 25, 2025
6415b1b
Update MVStoreBibEntryRelationDAO serializer/deserializer
Jan 25, 2025
e18d557
Update CHANGELOG-MD for Citations relations tab caching logic (#11189)
Jan 26, 2025
57b5c02
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Jan 26, 2025
16cfd2c
Return an empty BibEntry from MVStoreBibEntryRelationDAO in case of p…
Jan 26, 2025
33f5cdf
Add a test to ensure that an empty list is returned from in case of s…
Jan 27, 2025
2ebf62e
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Jan 28, 2025
6861ae2
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Jan 31, 2025
393b133
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Feb 2, 2025
e8e223d
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Feb 2, 2025
5727ecb
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
koppor Feb 3, 2025
0cdf495
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Feb 6, 2025
48c48ad
fix typo (#11189)
Feb 6, 2025
7af20c3
Address CHANGE_LOG follwing review (#11189)
Feb 7, 2025
eb3dfd8
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Feb 7, 2025
14ab672
Add comments for tests helpers (#11189)
Feb 7, 2025
061bb89
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Feb 7, 2025
76b2289
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
koppor Feb 9, 2025
a36acd4
Improve BibEntries for test (more confirming to BibTeX)
koppor Feb 9, 2025
8893936
Fix variable name
koppor Feb 9, 2025
37354f5
Streamline code
koppor Feb 9, 2025
b3e1746
Fix class names: "Repository" instead of DAO
koppor Feb 9, 2025
24c1707
Make test BibTeX more consistent to "normal" BibTeX
koppor Feb 9, 2025
d3cac8b
Add comment on test constructor
koppor Feb 9, 2025
deab9b5
Fix class name (not being imperative any more)
koppor Feb 9, 2025
e40637b
Merge branch 'fix-issue-11189-part-00-refactor-citation-relation-tab-…
koppor Feb 9, 2025
543c48b
Fix method name
koppor Feb 9, 2025
a2d3856
Use annotations instead of JavaDoc comments
koppor Feb 9, 2025
31cd171
Add FIXME
koppor Feb 9, 2025
2d31d0f
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
koppor Feb 16, 2025
5bdc850
Add JavaDoc comment
Feb 16, 2025
c03d1f5
Add JavaDoc comment
koppor Feb 16, 2025
4b33bfa
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Apr 27, 2025
d82ab8c
Update CHANGE_LOG
Apr 27, 2025
e9ac90e
Remove the LRU cache layer
Apr 27, 2025
10a1d6a
Simplify repositories naming
Apr 27, 2025
033b296
Open the MVStore once and close it only at application shutdown
Apr 28, 2025
59a2d24
Checkstyle corrections
Apr 28, 2025
4ffd652
Fix MD checks
Apr 28, 2025
7a81e73
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
Apr 28, 2025
70895c0
Merge remote-tracking branch 'origin/main' into fix-issue-11189-part-…
koppor Jun 5, 2025
e2f0844
Fix serialization and lifecycle
calixtus Jun 7, 2025
0b67868
Fix handling of null response from server
calixtus Jun 7, 2025
85835d9
Fix imports
calixtus Jun 7, 2025
1b5977e
Fix injection
calixtus Jun 7, 2025
bcaf43f
Fix tests
calixtus Jun 7, 2025
873b134
Adapt heap space for test on ci
calixtus Jun 7, 2025
bdd103b
Refactor
subhramit Jun 7, 2025
c58a072
Fix one parameter
subhramit Jun 7, 2025
c16d4ad
One line for two parameters
subhramit Jun 7, 2025
2f09c3a
Fixes module exports
calixtus Jun 7, 2025
c23bf0e
Merge remote-tracking branch 'alexandre-cremieux/fix-issue-11189-part…
calixtus Jun 7, 2025
73e5ea6
Unnecessary `this`
subhramit Jun 7, 2025
8a2a93f
Merge branch 'main' into fix-issue-11189-part-00-refactor-citation-re…
koppor Jun 7, 2025
e70fa74
Try hacky solution for MVStore usage
koppor Jun 7, 2025
a50ab07
Try 6GB
koppor Jun 7, 2025
496fbad
Add System.gc() call
koppor Jun 7, 2025
7b5bd76
Add plus one second in the test
koppor Jun 7, 2025
162888d
Disable on CI
calixtus Jun 7, 2025
e148226
Merge remote-tracking branch 'alexandre-cremieux/fix-issue-11189-part…
calixtus Jun 7, 2025
890dfdb
Revert quickhack
calixtus Jun 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv

### Added

- We introduced a settings parameters to manage citations' relations local storage time-to-live with a default value set to 30 days. [#11189](https://github.com/JabRef/jabref/issues/11189)

### Changed

- We improved the citations relations caching by implementing an offline storage. [#11189](https://github.com/JabRef/jabref/issues/11189)
- We added a tooltip to keywords that resemble Math Subject Classification (MSC) codes. [#12944](https://github.com/JabRef/jabref/issues/12944)
- We added a feature to convert keywords that resemble MSC codes to their descriptions. [#12944](https://github.com/JabRef/jabref/issues/12944)
- We introduced a new command line application called `jabkit`. [#13012](https://github.com/JabRef/jabref/pull/13012) [#110](https://github.com/JabRef/jabref/issues/110)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.vfs.watch=true

# Hint by https://docs.gradle.org/current/userguide/performance.html#increase_the_heap_size
# Otherwise, one gets "Java heap space" errors.
org.gradle.jvmargs=-Xmx6096M
org.gradle.jvmargs=-Xmx6g

# hint by https://docs.gradle.org/current/userguide/performance.html#enable_configuration_cache
# Blocked by https://github.com/beryx/badass-jlink-plugin/issues/304
Expand Down
13 changes: 13 additions & 0 deletions jabgui/src/main/java/org/jabref/gui/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.jabref.gui.util.WebViewStore;
import org.jabref.logic.UiCommand;
import org.jabref.logic.ai.AiService;
import org.jabref.logic.citation.SearchCitationsRelationsService;
import org.jabref.logic.journals.JournalAbbreviationLoader;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.l10n.Localization;
Expand Down Expand Up @@ -66,6 +67,8 @@ public class JabRefGUI extends Application {

// AI Service handles chat messages etc. Therefore, it is tightly coupled to the GUI.
private static AiService aiService;
// CitationsAndRelationsSearchService is here configured for a local machine and so to the GUI.
private static SearchCitationsRelationsService citationsAndRelationsSearchService;

private static FileUpdateMonitor fileUpdateMonitor;
private static StateManager stateManager;
Expand Down Expand Up @@ -187,6 +190,14 @@ public void initialize() {
dialogService,
taskExecutor);
Injector.setModelOrService(AiService.class, aiService);

JabRefGUI.citationsAndRelationsSearchService = new SearchCitationsRelationsService(
preferences.getImporterPreferences(),
preferences.getImportFormatPreferences(),
preferences.getFieldPreferences(),
entryTypesManager
);
Injector.setModelOrService(SearchCitationsRelationsService.class, citationsAndRelationsSearchService);
}

private void setupProxy() {
Expand Down Expand Up @@ -407,6 +418,8 @@ public void stop() {
stopBackgroundTasks();
LOGGER.trace("Shutting down thread pools");
shutdownThreadPools();
LOGGER.trace("Closing citations and relations search service");
citationsAndRelationsSearchService.close();
LOGGER.trace("Finished stop");
}

Expand Down
13 changes: 12 additions & 1 deletion jabgui/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import org.jabref.gui.util.UiTaskExecutor;
import org.jabref.logic.ai.AiService;
import org.jabref.logic.bibtex.TypedBibEntry;
import org.jabref.logic.citation.SearchCitationsRelationsService;
import org.jabref.logic.help.HelpFile;
import org.jabref.logic.importer.EntryBasedFetcher;
import org.jabref.logic.importer.WebFetchers;
Expand Down Expand Up @@ -118,6 +119,7 @@ public class EntryEditor extends BorderPane implements PreviewControls, AdaptVis
@Inject private KeyBindingRepository keyBindingRepository;
@Inject private JournalAbbreviationRepository journalAbbreviationRepository;
@Inject private AiService aiService;
@Inject private SearchCitationsRelationsService searchCitationsRelationsService;

private final List<EntryEditorTab> allPossibleTabs = new ArrayList<>();

Expand Down Expand Up @@ -323,7 +325,16 @@ private List<EntryEditorTab> createTabs() {
tabs.add(new MathSciNetTab());
tabs.add(new FileAnnotationTab(stateManager));
tabs.add(new SciteTab(preferences, taskExecutor, dialogService));
tabs.add(new CitationRelationsTab(dialogService, undoManager, stateManager, fileMonitor, preferences, taskExecutor, bibEntryTypesManager));
tabs.add(new CitationRelationsTab(
dialogService,
undoManager,
stateManager,
fileMonitor,
preferences,
taskExecutor,
bibEntryTypesManager,
searchCitationsRelationsService
));
tabs.add(new RelatedArticlesTab(buildInfo, preferences, dialogService, stateManager, taskExecutor));
sourceTab = new SourceTab(
undoManager,
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading