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

Less backups #2995

Merged
merged 6 commits into from
Jul 11, 2017
Merged

Less backups #2995

merged 6 commits into from
Jul 11, 2017

Conversation

lenhard
Copy link
Member

@lenhard lenhard commented Jul 11, 2017

Addresses #2993

The frequent events are due to the bidirectional binding which transfers every change directly into the BibEntry. If we want fewer events, the only solution will probably be to break the binding, which would be very disappointing for the JavaFX implementation. In my point of view the problem is not on the side of event creation. After all, every change should trigger an event and JavaFX triggers many changes. Imho, this should be fixed in how we react to events.

I also noticed the exception, but do not get a dialog. This seems to happen because of the save operation invoked by the backup.

A solution might be to do less backups, by:

  1. Doing backups only every X events and not for every event
  2. Ignoring FieldChangeEvents in the Backup
  3. Adding the size of the field change in the FieldChangeEvent class, so that you can ignore it if only 1 character changed.

This PR combines options 1. and 3., i.e.: The backup manager ignores events that are very minor and only does a backup if enough of them have happened (currently set to five).

What do you think?

  • 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 lenhard added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jul 11, 2017
Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

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

Looks like a good solution!

@Siedlerchr Siedlerchr merged commit e35b6ac into master Jul 11, 2017
@Siedlerchr Siedlerchr deleted the less-backups branch July 11, 2017 15:13
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
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