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

Improve performance of journal abbreviation loader #3009

Merged
merged 2 commits into from Jul 13, 2017

Conversation

tobiasdiez
Copy link
Member

@tobiasdiez tobiasdiez commented Jul 13, 2017

This PR improves the performance of the journal abbreviation loader/repository/parser and thus is a partial fix for #2966.
Previously, loading and parsing the journal repository files took nearly 10 seconds and now almost nothing:
image
Main boost came from using equalsIgnoreCase instead of using equals(text.toLowerCase()) and changing LinkedList to HashSet as we don't care about the ordering.
I had to adopt two tests which relied on the sorting.

Moreover, only one copy of the list is now stored in memory opposed to the 1 + 4 maps previously (equates to 1/10 RAM consummation). In principle, this makes the journal auto completion slower but I couldn't notice any negative impact.

  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)
  • If you changed the localization: Did you run gradle localizationUpdate?

@lenhard
Copy link
Member

lenhard commented Jul 13, 2017

Awesome :) I've tested it locally and I have the feeling that startup is faster. I've played around a little with autocompletion, but I don't notice any difference.

However, you somehow have a failing journal abbreviation test now.

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Z

@tobiasdiez tobiasdiez merged commit 5cc9747 into master Jul 13, 2017
@tobiasdiez tobiasdiez deleted the improvePerformanceJournal branch July 13, 2017 19:54
Siedlerchr added a commit that referenced this pull request Jul 15, 2017
* upstream/master: (30 commits)
  Add preference migration for keybdingings (#3007)
  Shutdown previus AutosaveManager and BackupManager during SaveAs  (#2994)
  Run Checkstyle task after Test task (#3010)
  Mark LibraryOfCongressTest as a fetcher test (#3012)
  When browsing through the MainTable remember which EntryEditor tab was open (#3011)
  Improve performance of journal abbreviation loader (#3009)
  Update checkstyle 7.6.1 -> 8.0
  Don't abort build when there are checkstyle violations (#3006)
  Reimplement content selectors (#3003)
  Only do a back up for bigger changes or if a different field is edited (#3004)
  Listen to change events for setting dirty status of database (#3001)
  Fix #2967: MathSciNet tab works again
  Fix #2902: Tab in entry editor moves to next text area
  Fix #2946: external changes are now correctly shown in the entry editor
  Fix #2998: improve auto completion (#3002)
  Fix mac keybinding by replacing ctrl it with meta key (#3000)
  Less backups (#2995)
  [WIP] Complete rework of the auto completion (#2965)
  Eclipse J
  Add switch indentation for Eclipse and add some new missing formatting options
  ...
Siedlerchr added a commit that referenced this pull request Jul 15, 2017
* upstream/master:
  Add preference migration for keybdingings (#3007)
  Shutdown previus AutosaveManager and BackupManager during SaveAs  (#2994)
  Run Checkstyle task after Test task (#3010)
  Mark LibraryOfCongressTest as a fetcher test (#3012)
  When browsing through the MainTable remember which EntryEditor tab was open (#3011)
  Improve performance of journal abbreviation loader (#3009)
  Update checkstyle 7.6.1 -> 8.0
  Don't abort build when there are checkstyle violations (#3006)
  Reimplement content selectors (#3003)
  Only do a back up for bigger changes or if a different field is edited (#3004)
  Listen to change events for setting dirty status of database (#3001)
  Fix #2967: MathSciNet tab works again
  Fix #2902: Tab in entry editor moves to next text area
  Fix #2946: external changes are now correctly shown in the entry editor
  Fix #2998: improve auto completion (#3002)
  Fix mac keybinding by replacing ctrl it with meta key (#3000)
  Less backups (#2995)
  [WIP] Complete rework of the auto completion (#2965)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants