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

Reduce memory footprint #6298

Merged
merged 4 commits into from
Apr 17, 2020
Merged

Reduce memory footprint #6298

merged 4 commits into from
Apr 17, 2020

Conversation

tobiasdiez
Copy link
Member

by removing some caching of ids and keys in databases.
image
Realized to late that the numbers are actually quite small. So this doesn't give much of a boost, but anyway it also doesn't hurt. Moreover, in my opinion, the code is more readable now.

  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

- Cache latex free field values for display in the main table
- Only access preferences once for how to display names (instead of for every entry again)
- Update search async only after 400ms without typing
by removing some caching of ids and keys in databases
@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 16, 2020
@Siedlerchr
Copy link
Member

You seem to have committed on top of an old branch. I had a déjà vu seeing some changes

@tobiasdiez
Copy link
Member Author

Yep, now it should be fine. Sorry

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like intelligent models. No need for "artificial" separation in model and logic. However, we wanted to keep the model package very slim ("dumb"?).

I'd like to hear @stefan-kolb's take on this.

@Siedlerchr
Copy link
Member

Could you please check the performance of import? The duplication checker is heavily used on import

@tobiasdiez
Copy link
Member Author

I didn't experience any performance problems with it. Adding a new entry is now slightly slower because we have to traverse a ArrayList instead of looking up a key in a hashmap. But I guess the difference should be negligible to average size databases of <= 10k entries.

@koppor not sure what you mean with model vs logic. All my changes concern only the model package.

@Siedlerchr Siedlerchr merged commit accd387 into master Apr 17, 2020
@Siedlerchr Siedlerchr deleted the improvePerfNew branch April 17, 2020 14:18
Siedlerchr added a commit that referenced this pull request Apr 17, 2020
…ionCaseInsensitive

* upstream/master: (25 commits)
  ActionHelper to test for present file (#6151)
  Reduce memory footprint (#6298)
  Add missing abbreviated journal names (#6292)
  fix l10n again
  fix checkstyle
  fix l10n
  Try to minimize CodeCov "wrong metrics"
  Showing correct icon on main table linked files column (#6264)
  Fix labels for outdated dependency issue
  Change one more line
  Squashed 'src/main/resources/csl-styles/' changes from c31d9ca..c1793d2
  Resolve unit test from failing
  Add one more change
  Fix errors
  RIS import takes the wrong date and duplicates abstract (#6272)
  Update EntryTypeView.java
  Change to the old school format
  Fix XmpExporterTest (#6289)
  Add checkstyle screenshot (and lint guidelines-...md)
  Squashed 'src/main/resources/csl-styles/' changes from db54e56..c31d9ca
  ...
@koppor
Copy link
Member

koppor commented Apr 23, 2020

@koppor not sure what you mean with model vs logic. All my changes concern only the model package.

Here a screenshot of the diff. I marked the package in green. I read model. OK, I have to confess that the functionality did not change. Furthermore, I learned that our thinking is called AnemicDomainModel, which is thought as being wrong by @martinfowler. So my comment (#6298 (review)) is not applicable any more. Still want to discuss that wiht @stefan-kolb. Maybe at #JabCon?

grafik

koppor pushed a commit that referenced this pull request Jan 1, 2023
43566f2 Update molecular-oncology.csl (#6354)
38f2b5f Update san-francisco-estuary-and-watershed-science.csl (#6350)
724cb12 Update australasian-journal-of-philosophy.csl (#6344)
df6af86 Fix webpage in-text citation for council-of-science-editors-author-date.csl (#6318)
6900b58 Add month to magazine for Bluebook
e0a8148 Update cambridge-university-press-author-date-cambridge-a.csl (#6345)
0823448 Add space & comma before pp (#6343)
ff38cd2 Update american-journal-of-respiratory-and-critical-care-medicine.csl (#6341)
8727dfb Update early-music-history.csl (#6323)
1154354 Update boletin-de-pediatria.csl (#6310)
f25438e Update pravnik.csl (#6309)
db7a4ae Update zoological-journal-of-the-linnean-society.csl (#6304)
6c043a7 Create polygraphia.csl (#6307)
255e00c Create intellect-newgen-books.csl (#6308)
323629f Update historical-materialism.csl (#6300)
f62b70d Create european-review-of-international-studies.csl (#6301)
dff2698 Update ucl-university-college-harvard.csl (#6298)
0ce09c9 Update sciences-po-ecole-doctorale-note-french.csl (#6290)
bdd53ec Update sciences-po-ecole-doctorale-author-date.csl (#6291)
efde4d4 Create journal-of-law-medicine-ethics.csl (#6296)
7539b2c Create theses-de-sorbonne-universite.csl (#6295)
905f25a Update biochemical-society-transactions.csl (#6292)
a76a3f5 Update smithsonian-institution-scholarly-press author-date and note (#6294)
e6b6c6c Create exploration-of-targeted-anti-tumor-therapy.csl (#6276)
024c9c8 Create nys-nydanske-studier.csl (#6331)
d9ac8e1 Update vox-sanguinis.csl (#6327)
9a98e92 Remove DOI from Genetics & Molecular Biology

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 43566f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants