Skip to content
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

Meta-issue: Improve JabRef's performance - Reduce CPU / RAM usage, increase speed and detect bottlenecks #8906

Open
ThiloteE opened this issue Jun 17, 2022 · 1 comment

Comments

@ThiloteE
Copy link
Member

ThiloteE commented Jun 17, 2022

This meta-issue is here to provide a starting point for anybody who wants to work on performance issues and point them to related literature and utilities. It also keeps track of certain bugs related to performance degradation.

I would ask you to NOT START A DISCUSSION here. Comments may be hidden that do not add to the tools and documentation section.


JabRef's performance problems:

  • minimum requirements to run JabRef are comparatively high
  • High CPU usage --> high usage of electricity
  • Sometimes JabRef is slow (context: large databases)

Solution

  • Decrease CPU / RAM usage
  • Detect performance Bottlenecks
  • Do some performance checks from time to time and change code. Make JabRef become better and better.

Tools and documentation:

How to test:

  • Disable/Avoid known causes for performance drops (unless working on a fix/improvement for these specific cases). Where to find these specific causes? --> Check issues on GitHub with label "performance"
  • Also test with large databases.

How to create a large database:

  1. Install Python3. E.g., via https://www.python.org/downloads/
  2. Download https://github.com/JabRef/jabref/blob/main/scripts/bib-file-generator.py
  3. Open terminal
  4. cd into your Download directory
  5. Run python3 bib-file-generator.py
@ilippert ilippert mentioned this issue Aug 9, 2022
3 tasks
@koppor koppor moved this to High priority in Features & Enhancements Nov 7, 2022
@koppor koppor moved this to High priority in Prioritization Nov 10, 2022
@koppor koppor moved this from High priority to Low priority in Prioritization Mar 21, 2024
@koppor koppor moved this from Low priority to Normal priority in Prioritization Mar 21, 2024
@calixtus calixtus moved this from Normal priority to High priority in Prioritization Nov 13, 2024
@HoussemNasri
Copy link
Member

HoussemNasri commented Nov 16, 2024

Running heap dump analysis using jxray provided some interesting insights into JabRef's memory usage. The most interesting for me was that we have ~138MB of off-heap memory allocated (still don't know how and when it gets allocated) and many duplicated SimpleStringProperty and SimpleBooleanProperty objects around ~40MB of overhead.

It also discovered some memory leak candidates:

  • 102,834Kb (29.0%) Object tree for GC root(s) Java Static org.jabref.gui.preferences.general.GeneralTabViewModel.fontSizeValueFactory
  • 64,401Kb (18.2%) Object tree for GC root(s) Java Static org.jabref.gui.autosaveandbackup.BackupManager.runningInstances
  • 47,018Kb (13.3%) Object tree for GC root(s) Java Static [org.jabref.gui.JabRefGUI.preferences], Java Local(org.jabref.gui.preferences.JabRefGuiPreferences) [1 object(s)] (1 thread(s))
  • 34,475Kb (9.7%) Object tree for GC root(s) Java Static org.jabref.gui.JabRefGUI.mainFrame
  • 33,309Kb (9.4%) Object tree for GC root(s) Java Static org.jabref.logic.citationstyle.CitationStyle.STYLES

jabref-xray-heap-analysis.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: High priority
Development

No branches or pull requests

2 participants