Skip to content

Store Citation Relations in an LRU cache #10958

Closed
@HoussemNasri

Description

Problem

The current implementation caches the related entries (references and citations) as soon as they are fetched after visiting the Citation Relations Tab. The fetched entries are held cached in RAM until JabRef is restarted. This approach unnecessarily bloats the computer memory and could result in an out-of-memory exception in special circumstances.

Suggested solution

Instead of caching all entries, we could cache the citation relations of the top N entries that are most likely to be visited in the future. The Least Recently Used (LRU) Cache operates on the principle that the data most recently accessed is likely to be accessed again in the near future.

Implementation details

  • You don't have to write an LRU cache from scratch, JabRef depends on a LOT of libraries, some of them provide an LRU cache already, so try to use that if possible.

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions